Tag

System Design

Scalable system design notes: storage, queues, consistency, and the trade-offs that show up in interviews and production.

97 articles

7 min read

FOR UPDATE: No Row, No Lock

SELECT … FOR UPDATE locks tuples that exist. An empty scan is not a lock on the key. Two sessions both insert; a unique violation is the lucky case.

8 min read

SKIP LOCKED: Due Jobs, Empty Batch

SKIP LOCKED does not mean the next free job. It skips rows that currently have a conflicting lock. A forgotten transaction can make a full queue claim nothing until that session ends.

11 min read

Designing a Scalable Notification System

A system design deep dive into building a notification platform that handles push, email, SMS, and in-app notifications at scale — covering architecture, priority queues, fan-out strategies, rate limiting, and delivery tracking.