Ravindra BagaleCourses & study guides Track your progress

Guides

Airbnb Architecture Explained: How Airbnb Moved from a Rails Monolith to Services on AWS

Short answer: Airbnb runs on AWS. It started as a Ruby on Rails monolith called "Monorail", then moved step by step to a service-oriented architecture (SOA), with services running on Kubernetes on AWS. Early on Airbnb moved its MySQL database to Amazon RDS and stores user photos in Amazon S3. Airbnb also created and open-sourced Apache Airflow for data pipelines and SmartStack for service discovery.

Suppose you search Airbnb for a stay in Goa

You open Airbnb, type "Goa", pick dates for a weekend and tap Search. You see a map, photos, prices and reviews, and then you book. Behind the screen, in simple terms:

  1. Your app sends the search to Airbnb's servers on AWS; a load balancer receives it.
  2. An API gateway routes the request to the right backend services.
  3. Separate services handle search, listing details, pricing, availability and reviews.
  4. Listing and booking data is read from MySQL databases (Airbnb moved MySQL to Amazon RDS).
  5. Listing photos load from Amazon S3.
  6. When you book, payment and reservation services do their parts, and data pipelines (scheduled by Airflow) later use this data for analytics and search ranking.

What architecture style does Airbnb use?

Airbnb's architecture story is a famous "monolith to services" migration.

  1. Today (2025): Airbnb's core key-value store Mussel was rebuilt as Mussel v2, with a NewSQL backend and a stateless Dispatcher service on Kubernetes, giving p99 reads under 25 ms even for 100 TB+ tables (2025).
  2. How it started, Monorail (the monolith): Airbnb's first app was one big Ruby on Rails application. As teams grew, deployments clashed and one bug could affect everyone.
  3. Service-oriented architecture: Airbnb split business logic into separate services with clear owners, using standard service tooling and Thrift-based service interfaces (Building Services at Airbnb series).
  4. Gradual migration: Monorail was slowly reduced to routing and views while logic moved into services.
  5. Kubernetes on AWS: services moved from plain EC2 to Kubernetes clusters on AWS; Airbnb has written about dynamically scaling those clusters.
  6. Service discovery: in 2013 Airbnb open-sourced SmartStack (Nerve and Synapse, using ZooKeeper and HAProxy) so services could find healthy instances of each other.

Airbnb architecture diagram (public parts)

This diagram shows only what Airbnb or its partners have shared publicly. Press Play to follow a request step by step.

Watch the orange dot follow each numbered step.
Airbnb architecture from public information (simplified)AWS cloudData platform on AWSSimplified; based on publicly shared information.Guest / hostapp or browserLoad balancersElastic Load BalancingAPI gateway + serviceson Kubernetes (EC2)Cacheson EC2MySQL on Amazon RDSlistings, bookingsAmazon S3photos, static files, backupsService discoverySmartStack historyAirflow + Hive/Spark/Prestodata pipelines
  1. You search for a stay in Goa.
  2. Load balancers receive your request on AWS.
  3. The API gateway sends it to search, listing and pricing services.
  4. Hot data is served from caches.
  5. Listings and bookings are read from MySQL on RDS.
  6. Photos load from Amazon S3.
  7. Services find each other through service discovery.
  8. Booking data flows into Airflow-scheduled data pipelines.
  9. Results with photos and prices appear on your screen.
Diagram 1: the public parts of Airbnb's architecture. Simplified; based only on publicly shared information. Open the diagram as an image (PNG) · WebP

What does Airbnb use? Main technologies

LayerWhat Airbnb uses (public)What it does in simple words
Original appRuby on Rails monolith ("Monorail")The first version of Airbnb
Architecture nowService-oriented architectureMany owned services
ContainersKubernetes on AWSRuns and scales the services
DatabaseMySQL on Amazon RDSListings, users, bookings
FilesAmazon S3Photos, static files, backups
Service discoverySmartStack (Nerve + Synapse)Finds healthy service instances
Data pipelinesApache Airflow (created at Airbnb)Schedules data jobs
Big dataHive, Spark, Presto; Amazon EMR earlierAnalytics and machine learning

Which cloud provider does Airbnb use?

Airbnb uses AWS. Airbnb's early setup used

  1. Amazon EC2 for application, cache and search servers.
  2. Elastic Load Balancing to spread traffic.
  3. Amazon EMR to process data.
  4. Amazon S3 for backups, static files and user photos.
  5. The main MySQL database moved to Amazon RDS, with Multi-AZ, with only about 15 minutes of downtime during the move.

Later, Airbnb moved to running services on Kubernetes clusters on AWS.

What is Apache Airflow and why did Airbnb build it?

In 2015 Airbnb open-sourced Airflow, a platform to write, schedule and monitor data pipelines as code (in Python). Airbnb uses Airflow for:

  1. Data warehousing: cleaning and publishing data.
  2. Growth analytics and A/B experiment results.
  3. Email targeting.
  4. Search ranking metrics.
  5. Data infrastructure maintenance (cleanup, retention).

Today Airflow is an Apache project used by thousands of companies, and AWS even offers it as a managed service (Amazon MWAA).

How does Airbnb store data?

  1. MySQL on Amazon RDS for core data.
  2. Amazon S3 for photos, static files and backups; Airbnb also uses S3 for long-term storage of data retired from HDFS.
  3. A data warehouse built on Hive, with Spark and Presto for processing.
  4. The current exact database mix across all services is not publicly shared.

How does Airbnb monitor its systems?

  1. Every Airbnb HTTP app exposes a /health endpoint, and SmartStack's Nerve removes unhealthy backends automatically.
  2. Airflow gives a web UI to monitor data pipelines.
  3. The full current metrics and alerting stack is not publicly shared in detail.

If we built an app like Airbnb on AWS (illustrative)

Please read this first

This section is a learning design by Ravindra Bagale. It is not Airbnb's real setup. Airbnb does run on AWS, but its real setup is far larger and uses its own tools. We use AWS here because it is what you learn in the AWS course.

Suppose you want to build "KokanStay", a homestay booking app for the Konkan coast. Here is a simple AWS layout.

1. Network: VPC, subnets, route tables, gateways

  1. Create one VPC with CIDR 10.0.0.0/16 in the Mumbai region (ap-south-1).
  2. Use two Availability Zones (A and B), so one AZ failing does not stop the app.
  3. In each AZ make three subnets: public (load balancer, NAT gateway), private app (your code) and private data (databases, cache).
  4. Attach one internet gateway (IGW) to the VPC. Public route table: 0.0.0.0/0 → IGW. This route is what makes a subnet public.
  5. Private app route table: 0.0.0.0/0 → NAT gateway, so servers can download updates but nobody can connect in from the internet.
  6. Private data route table: only the local VPC route. Use VPC endpoints to reach S3, DynamoDB and SQS without going over the internet.

2. Compute: where the code runs

  1. ALB in both public subnets.
  2. Start with one well-structured app; split out search, booking and payments into services on EKS as the team grows (Airbnb's path).
  3. Background workers read SQS for emails and reminders.
  4. Schedule nightly data jobs with Amazon MWAA (managed Airflow).

3. Storage and databases

  1. S3 + CloudFront for listing photos.
  2. Aurora MySQL for listings, users and bookings (Multi-AZ).
  3. DynamoDB for availability calendars.
  4. ElastiCache for popular search results.

4. Monitoring

  1. A /health endpoint on every service, used by ALB health checks.
  2. CloudWatch alarms on booking errors and latency.
  3. X-Ray to trace a booking across services.

Request flow diagram

Press Play. The numbered list below the diagram lights up with each step.

Watch the orange dot follow each numbered step.
If we built a Airbnb-like app on AWS (illustrative)AWS Region (for example ap-south-1, Mumbai)VPC 10.0.0.0/16Availability Zone AAvailability Zone BPublic subnet 10.0.1.0/24RT: 0.0.0.0/0 → IGWPublic subnet 10.0.2.0/24RT: 0.0.0.0/0 → IGWApp subnet 10.0.11.0/24RT: 0.0.0.0/0 → NATApp subnet 10.0.12.0/24RT: 0.0.0.0/0 → NATData subnet 10.0.21.0/24RT: local onlyData subnet 10.0.22.0/24RT: local onlyvia VPC endpointsIllustrative learning design only. This is NOT the company's real setup.Userphone appRoute 53DNS lookupCloudFrontCDN edge cacheAmazon S3listing photosIGWApplication Load Balancerspans both AZsNAT gatewayNAT gatewayBooking servicesEKS pods (auto scaling)Booking servicesEKS pods (auto scaling)ElastiCachesearch resultsAuroralistings, bookingsElastiCachesearch resultsAuroraread replicaSQSbooking emailsDynamoDBavailability calendarCloudWatch + X-Raymetrics, logs, traces
  1. You open KokanStay. Route 53 finds the address.
  2. Listing photos load from CloudFront.
  3. On a miss, CloudFront fetches photos from S3.
  4. Your search enters the VPC through the internet gateway.
  5. The ALB sends it to a healthy pod.
  6. Booking services on EKS handle search and booking.
  7. Popular searches come from ElastiCache.
  8. Listings from Aurora; free dates from DynamoDB.
  9. A booking email job goes to SQS.
  10. CloudWatch and X-Ray record it all.
  11. Your results and booking confirmation appear.
Diagram 2: an illustrative AWS design for learning. Airbnb does not necessarily run like this; see the sections above for what is publicly known. Open the diagram as an image (PNG) · WebP

Airbnb versus our AWS design

PartAirbnb (public info)Our AWS design
CloudAWSAWS
StartRails monolith (Monorail)One app first
NowServices on KubernetesServices on EKS when needed
DatabaseMySQL on RDSAurora MySQL
PhotosS3S3 + CloudFront
Data pipelinesAirflow (built by Airbnb)Amazon MWAA
DiscoverySmartStackKubernetes services / ALB

Quick quiz: check what you learned

  1. What was Airbnb's original monolith called?

    1. Monorail
    2. Obidos
    3. Borg
    4. Gondola
    Show answer

    A. The Rails monolith was called Monorail.

  2. Where did Airbnb move its MySQL database?

    1. Google Cloud SQL
    2. Amazon RDS
    3. Azure SQL
    4. Oracle Cloud
    Show answer

    B. MySQL moved to Amazon RDS.

  3. What is Apache Airflow used for?

    1. Serving listing photos
    2. Encrypting payments
    3. Scheduling data pipelines
    4. Balancing web traffic
    Show answer

    C. Airflow schedules and monitors data pipelines.

  4. What does SmartStack help services do?

    1. Store photos in S3
    2. Write Ruby code faster
    3. Run SQL on Presto
    4. Find healthy services
    Show answer

    D. SmartStack handles service registration and discovery.