Blog 7 — Airbnb: Monolith to Microservices
C
Qubits of DPK
March 21, 2026
Core Case Studies
Core Concept: Service decomposition, Data ownership between services
Why SDE-2 Critical: Every growing company goes through this — shows architectural maturity in interviews
Status: Draft notes ready
Quick Revision
- Problem: One monolith slows teams, deployments, and scaling.
- Core pattern: Domain-based service boundaries with gradual extraction.
- Interview one-liner: Microservices are an organizational scaling tool, not a default architecture.
️ The Journey
javascript
QUBITS OF DPK
Core Concepts
Why Monoliths Break at Scale
javascript
QUBITS OF DPK
Service Decomposition Strategy
javascript
QUBITS OF DPK
Data Ownership Rule
javascript
QUBITS OF DPK
The Strangler Fig Pattern
javascript
QUBITS OF DPK
When NOT to Use Microservices
- Team < 10 engineers → monolith is faster
- Early product with changing requirements → microservices slow iteration
- No DevOps culture → microservices need strong infra discipline
- Distributed transactions needed everywhere → microservices make this painful
Results
5 Interview Questions This Blog Unlocks
Q1. When would you NOT use microservices?
Answer: Small team (< 10 engineers), early-stage product with frequently changing requirements, no strong DevOps culture, or when the domain boundaries aren't clear yet. Microservices add operational complexity — only justified when team/scale demands it.
Q2. How do microservices communicate with each other?
Answer: Synchronous: REST or gRPC (when you need immediate response). Asynchronous: Kafka/RabbitMQ (when you don't need immediate response, better for decoupling). Rule: prefer async when possible — it's more resilient.
Q3. How do you handle a transaction that spans multiple microservices?
Answer: Saga pattern. Each service does its local transaction and publishes an event. Next service listens and continues. If any step fails, compensating events roll back previous steps. Avoid 2-phase commit — it's slow and creates distributed locks.
Q4. What is the Strangler Fig pattern?
Answer: Gradual monolith decomposition. Don't rewrite everything at once (too risky). Instead, incrementally extract functionality into microservices. New features built as microservices. Old code extracted when touched. Monolith shrinks over time without a big-bang rewrite.
Q5. How do you ensure data consistency across microservices without shared databases?
Answer: Each service owns its DB. Consistency achieved through eventual consistency + events. Service A completes its transaction and publishes an event. Service B consumes event and updates its DB. Temporary inconsistency is acceptable in most cases. For strong consistency, use saga with compensating transactions.