Serving a Million Models: How Hugging Face Scaled with MongoDB Atlas
summary
Hugging Face runs metadata for 13 million users and almost 3 million models on MongoDB Atlas while model artifacts sit in S3; typical load is ~40k reads/sec with spikes to 140k. Current core is a 7-node replica set with electable primaries, read-only secondaries, a hidden analytics node, change streams on secondaries, Atlas Search for full‑text and planned vector search, and a move to sharded clusters for scale. New storage buckets use Atlas as backing storage and the setup is production proven.
AI-written summary · about
chapters (13)
- 0:00Introduction & Who is Hugging Face?
- 1:51Understanding the Scale: Millions of Users, Models & Datasets
- 4:17High-Level Architecture: How Hugging Face Uses MongoDB Atlas
- 6:05Live Demo: Models, Datasets, and Spaces Pillars
- 11:19Introducing a New Feature: Storage Buckets
- 13:19Interacting with the Hub via Hugging Face CLI
- 14:55Infrastructure Breakdown: 7-Node Replica Set Cluster
- 19:47Offloading Traffic: Read Preferences & Hidden Analytics Nodes
- 21:08Data Modeling: Compute Patterns & Document Embedding Limits
- 22:43Index Management & Atlas Search (Full-Text Search)
- 25:19The Move to Sharding: Choosing Shard Keys with Analyzers
- 27:30Hugging Chat Database Architecture
- 28:30Mongoku: Open-Source Web GUI for MongoDB
