2 November 2026

Posts published on funGyaan on 2 November 2026.

November 2026

MTWTFSS
1
2345678
9101112131415
16171819202122
23242526272829
30

  1. How does a leaderboard stay sorted under constant updates?

    At a million players, a skip list updated a score in 6 µs and found a player's rank in 3 µs. A sorted array found ranks fast but took 3.4 ms per update; a plain map updated in nanoseconds but needed 22 ms per rank. That's why Redis sorted sets use skip lists. Measured, with the code.

    · 6 min read · Data Structures

  2. How do you migrate a live database without downtime?

    Most outages during migrations aren't failed migrations; they're migrations that held a lock while traffic queued behind them. Measured on a 5M-row table under load: one-step changes that stalled every request for 2-8 seconds, and the online versions that stalled them for a fraction of a second…

    · 9 min read · System Design

  3. When should a write go through a queue instead of the API?

    Queue the work behind a write when it's slow, unreliable or can finish after you answer; keep it synchronous when the caller needs the result. And never publish from the request itself: use an outbox.

    · 11 min read · System Design

  4. SQS, SNS or EventBridge: which one for which job?

    Three AWS messaging services that overlap enough to confuse: a queue for work, a topic for fan-out, and an event bus for routing by content. What each guarantees, how each fails, and the combinations most systems actually use.

    · 9 min read · AWS