Read path
94% of reads never touch the database
Redis answers them in about 1 ms. Only misses reach Postgres.
- The client asks the API for user 42.
- The API asks Redis first.
- A hit returns in about 1 ms. Done.
- A miss reads Postgres in about 9 ms, because the key expired.
- The API writes the row back, so the next read hits.
Load
Postgres now serves 6% of reads
Hit rate · 7 days94%
p50 read latency1.2 ms
Postgres reads / s340
Failure modes
One failure mode is still open
Handled
User updates profile
Handled
Key reaches its TTL
Accepted
Write races a read
Open risk
Redis is down
Sources
src/cache/user.ts:14–52 · src/routes/user.ts:30 · dashboard "user-service read path", last 7 days.