Airbnb had a successful migration to microservices, but managing hundreds of services made new challenges. The dependency graph is too complicated impacting scalability, reliability and velocity. Learn how we are evolving our read path service architecture to continue scaling our business.
30. Architecture 2018
Service-oriented arch (SOA)
API gateway
Middleware
Session data
service
Authentication
data service
Oauth data
service
Risk computed
data service
...
Request
context
Web rendering
service
HTML view
@jessicamtai
Routing
Presentation, logic, data
31. 2019
After 3 years of migration,
enforced “Monorail freeze”
@jessicamtai
46. Number of services at Airbnb
0
150
300
450
600
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
500+ engineers
2,000+ engineers
@jessicamtai
47. Challenges with SOA v1
Defect rate
Fragmented business
logic
Developer velocity
Too many
dependencies
New verticals
Scattered, custom
APIs & schemas
Scalability
Unguarded data
access
@jessicamtai
71. Service
[SOA v1] Fragmented computed data
Superhost example
Reservations
data service
@jessicamtai
Reviews data
service
Cancellations
data service
Client
Service
72. Superhost example
Owned by
separate teams
Reservations
data service
Reviews data
service
Cancellations
data service
@jessicamtai
Client
[SOA v1] fragmented computed data
Service
Service
73. [SOA v2] Computed data as modular platform
Superhost example
Client
Computed data
platform service
Reservations
data service
Data source config
Data attribute Source
A Reservations
B Reviews
C Cancellations
@jessicamtai
Reviews data
service
Cancellations
data service
74. [SOA v2] Computed data as modular platform
Superhost example
Computed data
platform service
Data source config
Business logic lambda
boolean isSuperhost(A, B, C) {
return A && B && C;
}
Reservations
data service
@jessicamtai
Reviews data
service
Cancellations
data service
Client
75. Computed data as modular platform
Superhost example
Computed data
platform service
Offline pipeline &
index framework
A
B
C
Eventual
consistency
@jessicamtai
Client
76. Migration to computed data
Computed data
service
DataDataDataData
Compare responses
from codepaths
Service
Presentation
@jessicamtai
Offline
comparison
framework
87. Facade service Facade service
Presentation
UI logic
Data aggregation service
Service
Service
Service
@jessicamtai
[SOA v2] Service blocks
88. [SOA v2] Facade + computed data
Unified service
Computed data
platform
Facade service &
Presentation
UI logic
Data aggregation service
@jessicamtai
89. Migration to service blocks
Facade service
DataDataData
Computed
Data aggregation serviceClient service
@jessicamtai
93. SOA V2: Read path
computedFacade +
Presentation
UI logic
Data aggregation service
Service
Service
Service
computedFacade +
DataDataDataData
@jessicamtai
94. Pilot results
•Data aggregation service: 35% lower latency
[v1] Presentation service calls to data services
[v2] Single GraphQL query to aggregator
•Computed data platform: 30% faster engineer velocity
[v1] Implement in own service
[v2] Add to computed data platform
@jessicamtai