skalierbarkeit, agilität und gleichzeitig zuverlässigkeit...

24
Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit durch Microservice-Architekturen Wilhelm (Willi) Hasselbring Software Engineering Group, Kiel University, http://se.informatik.uni-kiel.de/ http://kosse-sh.de/ Architekturen 2017 W. Hasselbring & G. Steinacker 1 Guido Steinacker Otto GmbH & Co KG Werner-Otto-Straße 1–7 D-22179 Hamburg https://dev.otto.de/ W. Hasselbring and G. Steinacker: “Microservice architectures for scalability, agility and reliability in e-commerce”. In Proc. 2017 IEEE International Conference on Software Architecture Workshops (ICSA 2017), Gothenburg, Sweden, Apr. 2017. http ://eprints.uni-kiel.de/37489

Upload: others

Post on 17-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit durch

Microservice-Architekturen

Wilhelm (Willi) HasselbringSoftware Engineering Group,

Kiel University, http://se.informatik.uni-kiel.de/

http://kosse-sh.de/

Architekturen 2017 W. Hasselbring & G. Steinacker 1

Guido SteinackerOtto GmbH & Co KG

Werner-Otto-Straße 1–7D-22179 Hamburghttps://dev.otto.de/

W. Hasselbring and G. Steinacker: “Microservice architectures for scalability, agilityand reliability in e-commerce”. In Proc. 2017 IEEE International Conference on Software Architecture Workshops (ICSA 2017), Gothenburg, Sweden, Apr. 2017. http://eprints.uni-kiel.de/37489

Page 2: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Context: otto.de

Architekturen 2017 W. Hasselbring & G. Steinacker 2http://www.ottogroup.com/de/presse/material.php

Page 3: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Web Shop until 2013

Architekturen 2017 W. Hasselbring & G. Steinacker 3

https://support.intershop.com/kb/index.php/Display/276B90

Page 4: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Scaling such Web Information Systems

Architekturen 2017 W. Hasselbring & G. Steinacker

Source: [Abbott & Fisher 2015]

Approaches to Scalability on the database layer:• Big enterprise server• Database replication• Database sharding

4

However, you have to scale everything to scale anything!

Page 5: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Agenda

1. Context2. Microservice Architectures for Scalability3. Microservice Architectures for Agility4. Microservice Architectures for Reliability5. Scalable Development of Microservices6. Takeaways

Architekturen 2017 W. Hasselbring & G. Steinacker 5

Page 6: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Project Lhotse 2011-2013• In 2011, Otto started a complete re-implementation of

their ecommerce software from scratch.• The drivers for this decision were diverse, but had

mostly to do with non-functional requirements like scalability, performance and fault tolerance. – Regarding scalability, they were not only thinking about

technical scalability in terms of load or data. – They needed a solution that was scaling with respect to

the number of teams and/or developers working on the software at a given time.

– In addition to that, they planned to practice DevOps including continuous deployment, in order to deliver features quickly to the customer.

Architekturen 2017 W. Hasselbring & G. Steinacker 6

https://www.otto.de/unternehmen/de/newsroom/dossiers/lhotse.php

Page 7: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Modernization Strategy

• What they have found was in the first place a little bit unusual, but in the end highly successful:– Instead of setting up a single development team to create a new

platform for the shop, they were actively employing Conway’s Law by starting development with initially four separate teams with four loosely coupled applications (a.k.a. microservices):

• Product, being responsible for products and their presentation.• Order for shopping carts and the order process.• Promotion, serving product recommendations and promotions for assortments,

brands, and so on.• Search and Navigation for search and navigation in the shop.

• In the following years, they founded several more teams and systems.

Architekturen 2017 W. Hasselbring & G. Steinacker 7

Page 8: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Verticals at otto.de

Architekturen 2017 W. Hasselbring & G. Steinacker 8

Back

offic

e

Shop

page

s

Sear

ch &

Nav

igat

ion

Prod

uct

Prom

otio

n

Ord

er

Use

r

Afte

rSal

es

Auth

Insi

ghts

Link

Han

dler

Trac

king

Page Assembly Proxy

Backend Integration Proxy

Page 9: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Verticals and Microservices at otto.de

Architekturen 2017 W. Hasselbring & G. Steinacker 9

Page Assembly Proxy

Backend Integration Proxy

...

This architecture allows elasticity for horizontal scalability[van Hoorn et al. 2009, von Massow et al. 2011, Hasselbring 2016]

Page 10: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Agenda

1. Context2. Microservice Architectures for Scalability3. Microservice Architectures for Agility4. Microservice Architectures for Reliability5. Scalable Development of Microservices6. Takeaways

Architekturen 2017 W. Hasselbring & G. Steinacker 10

Page 11: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Scaling Delivery Pipelines at otto.deContinuous Deployment and DevOps

Architekturen 2017 W. Hasselbring & G. Steinacker 11

Goals:• Set up new pipelines quickly and automatically using a templating mechanism.• Being able to build pipelines just like the microservices from tested code

maintained in a Git repository.• Because most of the time, pipelines are simply waiting to be triggered, they aim

at a solution that does not waste hardware resources while not in use.Solution: LambdaCD (internal domain-specific language written in Clojure)

Page 12: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Life Deployments @ Otto.de

Architekturen 2017 W. Hasselbring & G. Steinacker 12

Page 13: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Agenda

1. Context2. Microservice Architectures for Scalability3. Microservice Architectures for Agility4. Microservice Architectures for Reliability5. Scalable Development of Microservices6. Takeaways

Architekturen 2017 W. Hasselbring & G. Steinacker 13

Page 14: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Deployment Pipeline with Quality Gates

Architekturen 2017 W. Hasselbring & G. Steinacker 14

[Breetzmann et al. 2014][Farley 2007]

Page 15: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Life Deployments & Incidents @ Otto.de

Architekturen 2017 W. Hasselbring & G. Steinacker 15

Page 16: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Agenda

1. Context2. Microservice Architectures for Scalability3. Microservice Architectures for Agility4. Microservice Architectures for Reliability5. Scalable Development of Microservices6. Takeaways

Architekturen 2017 W. Hasselbring & G. Steinacker 16

Page 17: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Conway’s Law“The basic thesis of this article is that organizations which design systems […] are constrained to produce designs which are copies of the communication structures of these organizations”

[Conway 1968]

Architekturen 2017 W. Hasselbring & G. Steinacker 17

If the organizational structure is decomposed vertically and according to the microservices structure into cross-functional feature teams, • scaling development capacities according to changing business

requirements is enabled.• The feature teams should be highly independent, having

members of all roles and skills that are required to build and maintain their microservice.

Decoupling teams as relevant as decoupling software modules

Page 18: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Component vs. Middleware Reuse

Example:https://github.com/otto-de/

Architekturen 2017 W. Hasselbring & G. Steinacker 18

Shared Component C

Component A Component B

Component A

Component BOpen Source Middleware

Page 19: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Microservice Architectures for Scalability, Agility and

Reliability

Architekturen 2017 W. Hasselbring & G. Steinacker 19

Scalability for both, runtime performance and development performance.

Reliability

Page 20: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Ausblick: Microservices PosterObjektSpektrum, September 2017

AK Microservices, 31.05.2017 W. Hasselbring 20

Page 21: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

User Group "Softwarearchitektur und Softwareentwicklung“ Erfahrungsaustausch, Praxisvorträge & Netzwerk

Der Fokus liegt auf folgenden Themen:

• Best Practice Beispiele• Technologische Entwicklungen im Architekturumfeld• Bewertung von Trends und Architekturen• Rolle der Architektur im Unternehmen• IT-Compliance• Serviceorientierung

Frühere Themenschwerpunkte, u.a.:• Betrieb von Big Data Anwendungen• Self-contained Systems• Microservice-Architekturen und Continuous Deliervery• Weiterentwicklung langlebiger Softwarearchitekturen – Design for Change• Architekturbasierte Migration und Modernisierung• Softwarearchitektur und Agilität

www.softwareforen.de/softwarearchitektur

Page 22: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

Automated Quality AssuranceExample: Regression Benchmarking

Architekturen 2017 W. Hasselbring & G. Steinacker

Integrated into Continuous Integration Setup[Waller et al. 2015]

Should include automated anomaly detection [Marwede et al. 2009, Ehlers et al. 2011]

22

https://build.se.informatik.uni-kiel.de/jenkins/job/kieker-nightly-release/plot/

Page 23: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

DevOps & Software Architecture

Architekturen 2017 W. Hasselbring & G. Steinacker

“The deployment pipeline is the place where the architectural aspects and the process aspects of DevOps intersect.”

[Bas et al. 2015]

23

Page 24: Skalierbarkeit, Agilität und gleichzeitig Zuverlässigkeit ...oceanrep.geomar.de/38495/1/2017-06-20Architekturen.pdf · build pipelines just like the microservices from tested code

References[Abbott & Fisher 2015] M.L. Abbott, M.T. Fisher: The Art of Scalability. Addison-Wesley, 2nd Edition, 2015.[Bas et al. 2015] Len Bass, Ingo Weber, Liming Zhu: “DevOps: A Software Architect’s Perspective”, Addison-Wesley 2015.[Breetzmann et al. 2014] R Breetzmann, S. Kraus, C. Stamm: “Null Toleranz für Fehler: Wie wir auf otto.de die Qualität hoch halten“, OBJEKTspektrum

4/2014, 18-23.[Conway 1968] M.E. Conway: How do committees invent? Datamation, 14(4):28-31, April 1968.[Ehlers et al. 2011] J. Ehlers, A. van Hoorn, J. Waller, W. Hasselbring: Self-Adaptive Software System Monitoring for Performance Anomaly Localization. In:

8th IEEE/ACM International Conference on Autonomic Computing (ICAC 2011).[Farley 2007] D. Farley: “The Deployment Pipeline”. ThoughtWorks, Inc. https://continuousdelivery.com/, 2007.[Hasselbring 2000] W. Hasselbring: “Information System Integration” In: Communications of the ACM, 43(6): 32-36, June 2000.[Hasselbring 2002a] W. Hasselbring: “Component-Based Software Engineering” In: Handbook of Software Engineering and Knowledge Engineering. World

Scientific Publishing, Singapore, pp. 289-305, 2002.[Hasselbring 2002b] W. Hasselbring: “Web Data Integration for E-Commerce Applications,” IEEE Multimedia, vol. 9, no. 1, pp. 16–25, 2002.[Hasselbring 2006] W. Hasselbring: “Software-Architektur”. In: Informatik-Spektrum 29(1): 48-52, February 2006.[Hasselbring 2016] W. Hasselbring: “Microservices for scalability: Keynote talk abstract,” In: Proceedings of the 7th ACM/SPEC on International

Conference on Performance Engineering (ICPE 2016). ACM, 2016, pp. 133–134.[Hasselbring & Steinacker] W. Hasselbring, G. Steinacker: “Microservice architectures for scalability, agility and reliability in e-commerce”. In Proc. 2017

IEEE International Conference on Software Architecture Workshops (ICSA 2017), Gothenburg, Sweden, Apr. 2017. [Kraus et al. 2013] S. Kraus, G. Steinacker, O. Wegner: “Teile und Herrsche – Kleine Systeme für große Architekturen“, OBJEKTspektrum 5/2013, 8-13.[Marwede et al. 2009] N. Marwede, M. Rohr, A. van Hoorn, W. Hasselbring: “Automatic Failure Diagnosis in Distributed Large-Scale Software Systems

based on Timing Behavior Anomaly Correlation“, In: 13th European Conference on Software Maintenance and Reengineering (CSMR 2009).[Steinacker 2014] G. Steinacker: Scaling with Microservices and Vertical Decomposition. http://dev.otto.de/2014/07/29/scaling-with-microservices-and-

vertical-decomposition/, 2014.[van Hoorn et al. 2009] A. van Hoorn, M. Rohr, I.A. Gul, W. Hasselbring: “An Adaptation Framework Enabling Resource-efficient Operation of Software

Systems” In: 2nd Warm Up Workshop for ACM/IEEE ICSE 2010 (WUP 2009) . [van Hoorn et al. 2012] A. van Hoorn, J. Waller, W. Hasselbring: “Kieker: A Framework for Application Performance Monitoring and Dynamic Software

Analysis”, In: 3rd joint ACM/SPEC International Conference on Performance Engineering (ICPE 2012).[von Massow et al. 2011] R. von Massow, A. van Hoorn, W. Hasselbring: “Performance simulation of runtime reconfigurable component-based software

architectures” In: Proceedings ECSA 2011, 2011, pp. 43–58.[Waller et al. 2015] Jan Waller, Nils Ehmke, Wilhelm Hasselbring: “Including Performance Benchmarks into Continuous Integration to Enable DevOps“, In:

ACM SIGSOFT Software Engineering Notes, 40(2).Architekturen 2017 W. Hasselbring & G. Steinacker 24