Reqflow
← All comparisons

Dynamo-Style KV Store vs URL Shortener

Dynamo-Style KV Store

Dynamo-Style KV Store

Leaderless replication, vector clocks, sloppy quorums, hinted handoff: the architecture behind DynamoDB and Cassandra.

Components (6)

  • Client
  • Coordinator Node
  • Storage Node A
  • Storage Node B
  • Storage Node C
  • Anti-Entropy (Merkle)

Headline numbers

  • Raw storage~300 TB
  • Per-node QPS~10K–20K req/sec
  • Replication write amplification3x
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 Dynamo-Style KV Store
None.
In both
  • Client
  • Service
  • Database
Only in URL Shortener
  • API Gateway
  • Redis

Flow shape

Dynamo-Style KV Store flows
  • Write with quorum (W=2, N=3)3 steps
  • Sloppy quorum + hinted handoff4 steps
  • Concurrent writes create siblings4 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