🔖
Smart Bookmark
System Architecture
Lakshya · Clocked In
Fetching Lakshya from the cloud…
L
So, what actually happens when you hit save?
When you save a bookmark, a lot happens behind the scenes. Pick a scenario below and watch the exact journey your request takes through DNS, TLS, load balancing, a Redis cache, and a PostgreSQL database, one arrow at a time.
API · Healthy
Redis · Warm
DB · Connected
Latency Timeline
Timeline appears here as flow runs…
Legend
Auth / App flow
Nginx routing
Redis cache
PostgreSQL query
Cache miss / invalidation
DNS resolution
Request Trace
Select a scenario above or wait for auto-play...
0%
Cache Hit Rate
auth queries saved
0ms
Avg Response Time
simulated end-to-end
0
DB Queries Saved
by Redis cache hits
0
Flows Simulated
since page load
⚡
Nginx Entry Point
SSL termination, rate limiting (200 req/s), round-robin load balancing across FastAPI replicas. Only port 80 exposed.
🚀
FastAPI App Layer
2 replicas × 2 Uvicorn workers. Stateless. Validates JWT, checks Redis, queries PostgreSQL only on cache miss.
⚡
Redis Auth Cache
Stores
user:{id} JSON for 840s. Cache hit = 0 DB queries for auth. Invalidated on suspend/delete.🗄️
PostgreSQL Source of Truth
All data persisted here. Connection pool: 5 per worker. Queried for content and on cache miss only.
🐳
Docker Network
Isolated bridge network. Services reach each other by name:
redis:6379, db:5432.💾
Persistent Volumes
pgdata, redis_data, media_data. Survive restarts. Only wiped with docker compose down -v.