← All comparisons

Yelp (Location-Based Search) vs Instagram Feed

Yelp (Location-Based Search)

Yelp (Location-Based Search)

Geohash nearby search via a read-only location service, a geohash cache and a business-info cache, with a separate business service for owner edits.

Components (11)

  • Mobile Client
  • Load Balancer / API
  • Location-Based Service
  • Business Service
  • Review Service
  • Geohash Cache
  • Business-Info Cache
  • Geohash Index Table
  • Postgres
  • Cassandra
  • CDN

Headline numbers

  • Search QPS~5K/sec avg, ~25K peak
  • Geohash index sizefits in memory
  • Cache footprint (cell lists + objects)tens of GB
Instagram Feed

Instagram Feed

Fan-out on write vs read, ranking, CDN.

Components (10)

  • Mobile Client
  • CDN
  • API Gateway
  • Feed Service
  • Post Service
  • Kafka
  • Fan-out Worker
  • Redis
  • Postgres
  • S3

Headline numbers

  • Posts / sec (avg)~3,000/sec
  • Feed read QPS~58,000/sec
  • Fan-out writes / sec~600,000/sec

Key differences

Only in Yelp (Location-Based Search)
  • Geohash Index Table
In both
  • Client
  • Api Gateway
  • Service
  • Cache
  • Database
  • Cdn
Only in Instagram Feed
  • Kafka
  • S3

Flow shape

Yelp (Location-Based Search) flows
  • Search nearby4 steps
  • Search nearby (cold cells)5 steps
  • Owner edits business info (next-day)4 steps
  • Submit a review4 steps
  • Geohash index is down4 steps
Instagram Feed flows
  • Post a photo (fan-out on write)7 steps
  • Open feed (precomputed timeline)5 steps
  • Fan-out Worker is down7 steps
  • Timeline cache flushed (Redis restart)4 steps