System Design Classic
Search autocomplete suggests query completions as users type, requiring sub-100ms response times and frequency-based ranking. This GCP-native design uses a trie (prefix tree) stored in Memorystore (Redis) for fast prefix lookups, with Firestore tracking query frequencies. Perfect for search teams needing sub-100ms typeahead suggestions with frequency-based ranking and user-specific personalization.
Share this architecture with your network
The trie is partitioned by prefix ranges across Memorystore shards for distributed lookups. Each keystroke triggers a Cloud Function that retrieves suggestions from the appropriate shard. Query frequency updates flow through Pub/Sub and are aggregated by Cloud Functions into Firestore, then periodically synced back to the trie. A Cloud Run service handles full-text fallback for long queries.
Multi-Tenant SaaS Platform
Generic SaaS
Notification System
System Design Classic
Dropbox File Storage System
Dropbox
Chat Application System
System Design Classic
News Feed System
System Design Classic
Instagram Photo Sharing System
Instagram / Meta
Search Autocomplete System
Remix this architecture in Canvas