← All comparisons

Yelp (Location-Based Search) vs URL Shortener

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
URL Shortener

URL Shortener

Hashing, key generation, read-heavy caching.

Components (6)

  • Client
  • API Gateway
  • Write Service
  • Read Service
  • Redis
  • Postgres

Headline numbers

  • Write QPS (avg)~1,200/sec
  • Read QPS (avg)~120,000/sec
  • Storage per year~5 TB

Key differences

Only in Yelp (Location-Based Search)
  • Geohash Index Table
  • CDN
In both
  • Client
  • Api Gateway
  • Service
  • Cache
  • Database
Only in URL Shortener
None.

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
URL Shortener flows
  • Shorten a URL3 steps
  • Resolve short URL (cache hit)3 steps
  • Resolve short URL (cache miss)4 steps
  • Redis is down4 steps