L4 vs L7 load balancers: differences and when to use each
What layer 4 and layer 7 load balancers can see and do, ALB vs NLB on AWS, load balancing algorithms, and a typical layout for a learning platform.
Building for 100,000 students at once
37 articles
What layer 4 and layer 7 load balancers can see and do, ALB vs NLB on AWS, load balancing algorithms, and a typical layout for a learning platform.
Fixed and sliding windows, token and leaky buckets compared, where to enforce limits, distributed limits with Redis, and how to protect OTP, login and test submission.
How to scale WebSockets: connections per server, load balancing long-lived connections, Redis pub/sub fan-out, reconnect storms, and when SSE or polling is simpler.
What each Cache-Control directive does, no-cache vs no-store, ETags and revalidation, and ready-to-use headers for static files, HTML, APIs and HLS video.
How edge caches decide hits and misses, what Cloudflare caches by default, cache rules for HTML, APIs and HLS, measuring hit ratio, and purging safely.
Set up Nginx proxy_cache, microcache dynamic pages for one second, bypass logged-in users, and stop pile-ups with cache locks and stale-while-updating.
Pick a Django cache backend, use cache_page, template fragment caching and the low-level API safely, and invalidate with signals and versioned keys.
Why Redis is fast, how TTLs and eviction policies work, how to size memory, when persistence matters for a cache, and how Redis compares with Memcached.
Cache-aside, read-through, write-through and write-back compared: how each works, how each fails, and which suits course pages, progress and leaderboards.
Precompute leaderboards and reports inside PostgreSQL: create and index materialized views, refresh them concurrently, schedule refreshes, and know the alternatives.
TTLs, event-based deletes and versioned keys: choosing TTLs per data type, purging CDNs, avoiding stale reads after writes, and why eviction isn't invalidation.
Why one expired key can overload your database, and how locks, request coalescing, probabilistic early refresh, TTL jitter and serving stale data prevent it.
Upclass for institutes
Your courses, live classes and tests in your own branded app, with piracy protection on every lecture. Plans start at ₹1,999/month.