Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
From Monolith to Microservices:
@MELANIECEBULA / SEPT 2017 / FUTURESTACK
How to Scale Your Architecture
65k 191 4 mil
countriescities listings
What is airbnb?
AN ONLINE MARKETPLACE FOR SHARING HOMES
Who am I?
100%
Availability
100%
Productivity
Our time together
Moving to MicroservicesScaling the MonolithA Brief History
The origins of our
DevOps culture, and
how th...
A BRIEF HISTORY
1 GitHub repo 1 SRE Sysops
“Monorail”
OUR MONOLITHIC RUBY ON RAILS APPLICATION
1. triage
2. coordinate
3.communicate
Sysops
INCIDENT RESPONSE
DEVOPS CULTURE
Sysops
today
40
on-calls
2
primaries
2
shifts
engineers on
the rotation
sysops buddies weekdays
weekends
• Sysops Training every quarter
• Sysops training establishes best
practices for on-call and incident
response
• 33% of en...
Scaling Sysops
Monitoring &Alerting
• STATSD protocol
• Automatically collect system metrics
• Metrics live alongside feature code
• Easy for any developer to...
Alerts
CONFIGURATION AS CODE
SCALING MONORAIL DEPLOYS
When it starts to
become a problem
MONORAIL LOC
0
1000000
2000000
3000000
4000000
2009 2010 2011 2012 2013 2014 2015 2016 ...
All developers are
expected to “own” their
features from
implementation to
production.
Each developer is
expected to:
• de...
• everything merged into master is
deployable to production
• frequent deploys (with smaller batches)
• automate as much a...
Scaling Deploy Process
• builds, tests, and deploys must be fast
and reliable
• ping authors when they need to take
action...
THE MOVE TO
MICROSERVICES
“Essentially, a microservices architecture is a method of
developing software applications as a suite of independently
dep...
Why Not Microservices?
• Distributed systems
are hard!
• Naming things is
hard!
• Having to support
different languages /
...
Why Microservices?
• Independent
deployment
• Modular structure /
Ownership
• Secure / Performant
• Upgrading
dependencies
Why Microservices?
SCALING CONTINUOUS DELIVERY
Why Microservices?
Deploys per week (all apps, all environments)
Why Microservices?
75,000
production deploys
per year
Service registry
and discovery
Message busConfiguration
Management
Microservices architecture
THE BARE MINIMUM
Chef
Kubern...
Microservices architecture
AS YOU START TO SCALE
• Rapid provisioning (AWS instances)
• Devops culture
• Basic monitoring ...
Moment of Truth
Are we committed to microservices?
Services 900
developers
300
services
4k
deploys per week
Service Creation Challenges
• Supporting different languages / frameworks
• Services own their own data
• Standardized con...
Monorail P1 P2 P3 P4
UI Layer
API Layer
Splitting the Monolith
Vertical concerns
Horizontal concerns
UI Layer
API Layer
Splitting the Monolith
Vertical concerns
Horizontal concerns
Standardize Service Creation
NO SNOWFLAKES
Standardize Service Creation
OKAY BUT HOW?
Standardize and simplify your configuration!
• lives as code, inside applicatio...
1. Monolith first
2. Devops culture
3. Configuration as code
4. Monitoring and Alerting
5. Continuous delivery
6. Automate...
Airbnb, From Monolith to Microservices: How to Scale Your Architecture, FutureStack17
Airbnb, From Monolith to Microservices: How to Scale Your Architecture, FutureStack17
Upcoming SlideShare
Loading in …5
×

Airbnb, From Monolith to Microservices: How to Scale Your Architecture, FutureStack17

1,755 views

Published on

Hear from Melanie Cebula, Software Engineer at Airbnb, on how they utilize microservices to scale their architecture at FutureStack17 NYC.

See the video here: https://youtu.be/N1BWMW9NEQc

Be sure to subscribe and follow New Relic at:
https://twitter.com/NewRelic
https://www.facebook.com/NewRelic
https://www.youtube.com/NewRelicInc

Published in: Software
  • Be the first to comment

Airbnb, From Monolith to Microservices: How to Scale Your Architecture, FutureStack17

  1. 1. From Monolith to Microservices: @MELANIECEBULA / SEPT 2017 / FUTURESTACK How to Scale Your Architecture
  2. 2. 65k 191 4 mil countriescities listings What is airbnb? AN ONLINE MARKETPLACE FOR SHARING HOMES
  3. 3. Who am I?
  4. 4. 100% Availability 100% Productivity
  5. 5. Our time together Moving to MicroservicesScaling the MonolithA Brief History The origins of our DevOps culture, and how that shapes our tools The challenges we face as we scale Monolithic deploys The best practices for transitioning to microservices (that we learned the hard way)
  6. 6. A BRIEF HISTORY
  7. 7. 1 GitHub repo 1 SRE Sysops “Monorail” OUR MONOLITHIC RUBY ON RAILS APPLICATION
  8. 8. 1. triage 2. coordinate 3.communicate Sysops INCIDENT RESPONSE
  9. 9. DEVOPS CULTURE
  10. 10. Sysops today 40 on-calls 2 primaries 2 shifts engineers on the rotation sysops buddies weekdays weekends
  11. 11. • Sysops Training every quarter • Sysops training establishes best practices for on-call and incident response • 33% of engineers have attended a Sysops training • Service on-calls can escalate to Sysops • Blameless postmortem culture Sysops training
  12. 12. Scaling Sysops
  13. 13. Monitoring &Alerting
  14. 14. • STATSD protocol • Automatically collect system metrics • Metrics live alongside feature code • Easy for any developer to write • Service dashboards with both business metrics and system metrics Metrics ALONGSIDE CODE
  15. 15. Alerts CONFIGURATION AS CODE
  16. 16. SCALING MONORAIL DEPLOYS
  17. 17. When it starts to become a problem MONORAIL LOC 0 1000000 2000000 3000000 4000000 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018
  18. 18. All developers are expected to “own” their features from implementation to production. Each developer is expected to: • deploy their changes • monitor their changes • roll back, abort, or revert if necessary Democratic deploys
  19. 19. • everything merged into master is deployable to production • frequent deploys (with smaller batches) • automate as much as possible Continuous Delivery
  20. 20. Scaling Deploy Process • builds, tests, and deploys must be fast and reliable • ping authors when they need to take action • automatic (and fast) reverts • merge queue • automatic rollbacks for new exceptions
  21. 21. THE MOVE TO MICROSERVICES
  22. 22. “Essentially, a microservices architecture is a method of developing software applications as a suite of independently deployable, small, modular services in which each service runs a unique process and communicates through a well- defined, lightweight mechanism to serve a business goal.” — someone on the internet What is a microservices architecture?
  23. 23. Why Not Microservices? • Distributed systems are hard! • Naming things is hard! • Having to support different languages / frameworks
  24. 24. Why Microservices? • Independent deployment • Modular structure / Ownership • Secure / Performant • Upgrading dependencies
  25. 25. Why Microservices? SCALING CONTINUOUS DELIVERY
  26. 26. Why Microservices? Deploys per week (all apps, all environments)
  27. 27. Why Microservices? 75,000 production deploys per year
  28. 28. Service registry and discovery Message busConfiguration Management Microservices architecture THE BARE MINIMUM Chef Kubernetes Smartstack Envoy with Kafka
  29. 29. Microservices architecture AS YOU START TO SCALE • Rapid provisioning (AWS instances) • Devops culture • Basic monitoring / alerting • Continuous Delivery
  30. 30. Moment of Truth Are we committed to microservices?
  31. 31. Services 900 developers 300 services 4k deploys per week
  32. 32. Service Creation Challenges • Supporting different languages / frameworks • Services own their own data • Standardized configuration • Monitoring with microservices • Splitting the Monolith into services
  33. 33. Monorail P1 P2 P3 P4 UI Layer API Layer Splitting the Monolith Vertical concerns Horizontal concerns
  34. 34. UI Layer API Layer Splitting the Monolith Vertical concerns Horizontal concerns
  35. 35. Standardize Service Creation NO SNOWFLAKES
  36. 36. Standardize Service Creation OKAY BUT HOW? Standardize and simplify your configuration! • lives as code, inside application repository • automatically tested and validated as part of CI • can deployed and consumed as an artifact • has a standardized format and defaults
  37. 37. 1. Monolith first 2. Devops culture 3. Configuration as code 4. Monitoring and Alerting 5. Continuous delivery 6. Automate what you can 7. Your first service is going to be bad 8. Services own their own data 9. Break apart the Monolith 10. Standardize service creation The important part 10 TAKEAWAYS

×