Grokking the System Design Interview, Volume II
Vote

0% completed

Gmail: Detailed Component Design

Step 7: Detailed Component Design

The high-level design named the parts. This step looks inside four of them: the cache, threading, security, and search indexing. The diagram below shows how they connect.

Caching Layer

Common reads should not hit the database every time, so we add a cache.

Recently read emails and mailbox summaries stay in memory. When a user opens the inbox, we cache the newest N message headers. A refresh, or a second device asking for the same inbox, is served from the cache instead of the database. A distributed cache like Memcached or Redis works well here.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content