Building Microservices in the cloud at AutoScout24

29
Highway to heaven Building microservices in the cloud Continuous Lifecycle 2015

Transcript of Building Microservices in the cloud at AutoScout24

Page 1: Building Microservices in the cloud at AutoScout24

Highway to heavenBuilding microservices in the cloud

Continuous Lifecycle 2015

Page 2: Building Microservices in the cloud at AutoScout24

AgendaMeet AutoScout24Shifting gears How we build our servicesHow we organize ourselves

@cdeger & @wolfwolf

Page 3: Building Microservices in the cloud at AutoScout24

AutoScout24 - 30.000ft

CC

Page 4: Building Microservices in the cloud at AutoScout24

Baseline AutoScout24 IT

Highly optimized, but of last decade

IT platform supported growth for >6 years

Microsoft oriented stack

Enterprise IT setup - MTBF over MTTR

Proven agile and lean principles

C

Page 5: Building Microservices in the cloud at AutoScout24

New CEO

CC

Page 6: Building Microservices in the cloud at AutoScout24

Do you attract talent?

CC

Page 7: Building Microservices in the cloud at AutoScout24

CC

Page 8: Building Microservices in the cloud at AutoScout24

Project Tatsu

WW

Page 9: Building Microservices in the cloud at AutoScout24

Monolith to Microservices

Data center to AWS

.NET / Windows to JVM / Linux

Devs + Ops to DevOps culture

Involve product people

Five challenges

WW

Page 10: Building Microservices in the cloud at AutoScout24

Technical transformation

WW

Page 11: Building Microservices in the cloud at AutoScout24

Change the wheels while driving

WW

Page 12: Building Microservices in the cloud at AutoScout24

Strategic GoalsGoals of the business side

Architectural PrinciplesHigh-Level Principles

Design and Delivery PrinciplesTactical measures

Reduce Time to MarketSpeed, Fast Feedback

Cost Transparency Collect metrics to allow decisions cost vs. value.

Support Data-Driven DecisionsListen to users and validate hypothesis.Provide as many relevant metrics & data as possible.

You build it, you run itResponsibility to run and maintain a product stays with the building team. Fast feedback from live and customers helps us to continuously improve.

Organized around Business CapabilitiesBuild teams around products not projects. Follow the domain and respect bounded contexts. Inverse Conway Maneuver

Shared NothingAvoid shared infrastructure and tight coupling as much as possible. Don’t create the next monolith.

Macro and Micro ArchitectureClear separation. Autonomous micro services within the rules and constraints of the macro architecture.

AWS FirstFavor AWS service over managed service, over self-hosted OSS, over self-rolled solutions.

Data-Driven/ Metric-DrivenCollect metrics from processes and applications. Analyze, alert and act on them.

Eliminate Accidental ComplexityStrive to keep it simple. Focus on essential complexity. No silver bullet.

Event Sourcing and PublishingKeep history of state changes and publish application events.

Autonomous TeamsMake fast local decisions. Be responsible. Know your boundaries. Share findings.

Continuous DeliveryDeliver changes reliable, often and fast.

Infrastructure As CodeAutomate everything: Reproducible, traceable and tested.Immutable servers over snowflake servers.

DevOps CultureDevelopers and Ops work together in collaborative teams as engineers. No silos.

Be BoldGo into production early. Value monitoring over tests. Recover and learn. Optimize for MTTR not MTBF.

Security & Data PrivacySecurity must be first class citizen and everybody’s concern. Keep data-privacy in mind.

CC

Another goalWork in progress...

Page 13: Building Microservices in the cloud at AutoScout24

Principles

Organized around business capabilities

You build it, you run it

Be bold

Macro and micro architecture

Shared nothing

CWCW

Page 14: Building Microservices in the cloud at AutoScout24

Shared infrastructure

Shared nothing

Availability over shared nothing

Convenience offerings

No side effects

Fast local decisions over committee

Respect family ties WW

Page 15: Building Microservices in the cloud at AutoScout24

How (not) to share

Use over re-useRe-use only after hardeningCopy n’paste, OSS, libraryPull instead of push

WW

Page 16: Building Microservices in the cloud at AutoScout24

How many environments?

Which versions on staging?Prod differs anyway: Load, data, patterns

V2V3

V6 V5

V4

V7

V5

V8

Engineer CI Dev Staging

V1

V4

Prod

CC

Page 17: Building Microservices in the cloud at AutoScout24

Dev and prod is enough

Consumer driven contractsShadow trafficSemantic monitoringSmoke tests or canary releases

V2V3

V6 V5

V4

V7

V5

V8

Engineer CI Dev Prod

CC

Page 18: Building Microservices in the cloud at AutoScout24

Event Sourcing and data pumps

One way data highway

Event Sourcing - store history of all changes

WW

Page 19: Building Microservices in the cloud at AutoScout24

SQS + S3

Kinesis + S3

Kinesis + DynamoDB

SQS + DynamoDB

Proxy + DynamoDB

DynamoDB

Evolution

WW

Page 20: Building Microservices in the cloud at AutoScout24

Frontend integration

Shared nothing

Autonomous teams

One domain

High optimisation

CC

Page 21: Building Microservices in the cloud at AutoScout24

Frontend integration

CC

Page 22: Building Microservices in the cloud at AutoScout24

PageSpeed Module

css (page+fragment)

js (page+fragment)

ngx_pagespeed

css (page)

js (page)

css (fragment)

js (fragment)

CC

Page 23: Building Microservices in the cloud at AutoScout24

How to build autonomous teams

Do not fall back into old behavioursBeware of Mandelbrot teamsPager duty so that you run itFix broken windowsPart-time ops not workingNot all T-shapes are the same

Wolf

WW

Page 24: Building Microservices in the cloud at AutoScout24

Infrastructure guild

Agree on things to do

Share learnings

Delegate implementation to teams

Empty backlog should be normal

Infrastructure product teams needed?

CC

Page 25: Building Microservices in the cloud at AutoScout24

Two stacks

Cash stack meets shiny new stack

One company

Lights on in cash stack

Feature freeze

Where to build new features?

Ease of integration helps business people WW

Page 27: Building Microservices in the cloud at AutoScout24

AttributionsBlue sky, white-gray clouds by nature protector Natubico, www.vivism.info [CC BY-SA 3.0]

http://commons.wikimedia.org/wiki/File%3ABlue_sky%2C_white-gray_clouds.JPGA Danish Perspective by NASA [Public domain] http://commons.wikimedia.org/wiki/File%3AA_Danish_Perspective.jpg

http://commons.wikimedia.org/wiki/File%3ANASAComputerRoom7090.NARA.jpgGREG

EINRADAmazon16 by Neil Palmer/CIAT [CC BY-SA 2.0] https://www.flickr.com/photos/ciat/5641594952

BERGSTEIGERBarber in Cameroon by James Emery from Douglasville, United States (Daddy Joe_1355) [CC BY 2.0]

http://commons.wikimedia.org/wiki/File%3ABarber_in_Cameroon.jpgWide objectives by Kivela (Own work) [Public domain] href="http://commons.wikimedia.org/wiki/File

%3AWide_objectives.jpgTransformer Fire Barrier by GerryS1 (Own work) [CC BY-SA 3.0 or GFDL] http://commons.wikimedia.org/wiki/File

%3ATransformer_Fire_Barrier.jpg

Page 28: Building Microservices in the cloud at AutoScout24

Attributions (cont)Alonso Renault Pitstop Chinese GP 2008 by Bert van Dijk (Pitstop F1 ING Renault) [CC BY-SA 2.0]

http://commons.wikimedia.org/wiki/File%3AAlonso_Renault_Pitstop_Chinese_GP_2008.jpgPrinciple of Panchasheel by Prakash Adhikary (Own work) [CC BY 3.0] http://commons.wikimedia.org/wiki/File

%3APrinciple_of_Panchasheel.JPGTraffic Jam by Doo Ho Kim [CC BY-SA 2.0] https://www.flickr.com/photos/titicat/3049591547

Pellets by The original uploader was Richard Mayer at German Wikipedia [GFDL or CC-BY-SA-3.0] http://commons.wikimedia.org/wiki/File%3APellets.jpg

Pipes and Valves by Uwe Hermann [CC BY-SA 2.0] https://www.flickr.com/photos/73628542@N00/6272975359Size variation in Coccinella undecimpunctata (2127991716) by Gilles San Martin from Namur, Belgium [CC BY-SA 2.0]

http://commons.wikimedia.org/wiki/File%3ASize_variation_in_Coccinella_undecimpunctata_(2127991716).jpgMille crêpe by Laitr Keiows (Own work) [CC BY-SA 3.0 or GFDL] http://commons.wikimedia.org/wiki/File%3AMille_cr

%C3%AApe.jpgCountry Energy power line replacement 01 by Bidgee (Own work) [CC BY-SA 3.0]

http://commons.wikimedia.org/wiki/File%3ACountry_Energy_power_line_replacement_01.jpgPuzzling by Bernd Gessler (Own work) [CC BY-SA 3.0] https://commons.wikimedia.org/wiki/File%3APuzzling.JPG

Page 29: Building Microservices in the cloud at AutoScout24

Attributions (cont)Sharing Sucks (4536747557) by eyeliam from Portland, United States [CC BY 2.0]

http://commons.wikimedia.org/wiki/File%3ASharing_Sucks_(4536747557).jpg7Line 9184 (8263568241) by Metropolitan Transportation Authority of the State of New York (7Line_9184 Uploaded by

tm) [CC BY 2.0] http://commons.wikimedia.org/wiki/File%3A7Line_9184_(8263568241).jpgEngland rugby team 1905 by Russell & Sons (The Graphic) [Public domain or Public domain]

http://commons.wikimedia.org/wiki/File%3AEngland_rugby_team_1905.jpgWandergeselle by Sigismund von Dobschütz [CC BY-SA 3.0] http://commons.wikimedia.org/wiki/File

%3AWandergeselle_02.JPGFaber-Rechenschieber 5304 by User:Karl Gruber (Own work) [CC BY-SA 4.0] http://commons.wikimedia.org/wiki/File

%3AFaber-Rechenschieber_5304.JPGWheel clamps Texas by Richard Anderson from Denton, United States (Boots.) [CC BY-SA 2.0]

http://commons.wikimedia.org/wiki/File%3AWheel_clamps_Texas.jpgGuadalupeNOLA15Oct07Thanks by Infrogmation of New Orleans (Photo by Infrogmation) [GFDL or CC BY-SA 3.0]

http://commons.wikimedia.org/wiki/File%3AGuadalupeNOLA15Oct07Thanks.jpgAtariBasic by Calin99 (Own work) [GPL] http://commons.wikimedia.org/wiki/File%3AAtariBasic.png

Spare wheel by Brian Snelson [CC BY 2.0] https://commons.wikimedia.org/wiki/File:Spare_wheel_-_Flickr_-_exfordy.jpg