Unit 4 – Case Studies

Real-world NoSQL Applications
Social Media

Instagram Photo Storage

Instagram stores and serves billions of photos to users worldwide with sub-second load times. Rather than using a traditional relational database, Instagram relies on Apache Cassandra to handle massive write throughput for photo metadata while ensuring high availability across globally distributed data centers.
Key Facts:
  • Over 2 billion monthly active users uploading millions of photos daily
  • Cassandra cluster manages petabytes of photo metadata
  • Write-heavy workload with billions of inserts per day
  • Uses a partition key based on user ID for even data distribution
  • Zero single point of failure across multiple data centers

Focus Question:

Why is Cassandra a better choice than a relational database for Instagram's photo metadata?

Tip: Cassandra is ideal for write-heavy workloads that require high availability and horizontal scalability across distributed data centers.
E-Commerce

eBay Product Catalog

eBay's product catalog contains hundreds of millions of items with varying attributes – electronics have different specs than clothing, which differ from collectibles. Using MongoDB's flexible document model, eBay stores heterogeneous product data in a single collection without requiring a rigid schema, enabling rapid iteration on new product categories.
Key Facts:
  • Over 1.7 billion listings at any given time
  • Each product category has unique attributes and structures
  • MongoDB stores documents with varying schemas in one collection
  • Supports rich text search and geo-spatial queries for local sellers
  • Handles 50,000+ queries per second during peak traffic

Focus Question:

What MongoDB feature makes it ideal for storing eBay's diverse product catalog?

Tip: MongoDB's document model allows each item to have a completely different structure, making it perfect for catalogs with diverse product types.
Software Development

GitHub Repository Storage

GitHub hosts over 200 million repositories with billions of files and commit objects. GitHub uses a combination of custom storage solutions on top of MySQL (Vitess) for relational metadata and Git's content-addressable object store for file data. The system must handle extreme read-heavy workloads during peak hours while maintaining consistency for version control operations.
Key Facts:
  • Over 200 million repositories with 200+ million pull requests
  • Uses Vitess (sharded MySQL) for user and repository metadata
  • Git object storage uses content-addressable hashing (SHA-1)
  • Handles millions of clone and fetch operations per hour
  • Git LFS stores large binary files in a separate object store

Focus Question:

Why does GitHub use content-addressable storage for Git objects?

Tip: Content-addressable storage ensures data integrity (identical content produces the same hash) and enables automatic deduplication of repeated file versions.