← All comparisons

Amazon S3 (Object Storage) vs URL Shortener

Amazon S3 (Object Storage)

Amazon S3 (Object Storage)

Strongly consistent object storage: a metadata plane that locates objects, and a replicated (or erasure-coded) data plane spread across availability zones.

Components (9)

  • Client
  • API Service
  • Identity & Access Mgmt
  • Metadata Service
  • Data Routing Service
  • Placement Service
  • Primary Data Node · AZ1
  • Secondary · AZ2
  • Secondary · AZ3

Headline numbers

  • Erasure-coding overhead vs replication~50% less
  • Expected object losses / yr per 10B objects~0.1
  • Per-prefix QPS ceiling~5,500 GET / 3,500 PUT
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 Amazon S3 (Object Storage)
  • Primary Data Node · AZ1
In both
  • Client
  • Api Gateway
  • Service
  • Database
Only in URL Shortener
  • Redis

Flow shape

Amazon S3 (Object Storage) flows
  • PUT an object (replication)8 steps
  • GET an object5 steps
  • Alternative: erasure coding + AZ loss5 steps
  • Primary data node fails3 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