Writing
Notes from building software products.
How the hard parts of my projects work: rate limiting, realtime delivery, background jobs. Short, with the code that matters. Papers and datasets are under Research, and every post is in the RSS feed.
3 min readLimitYourAPI
How Redis rate limiters fail under load, measured
I measured eight Redis rate limiter designs in 3,853 trials. Check-then-act let 29% too much through, WATCH refused up to 42% of good traffic, and caller clocks broke token buckets.
11 min readLimitYourAPI
Atomic rate limiting with Redis and Lua, measured
Lua makes a Redis rate limiter atomic. I measured what that costs, and three ways the scripts still break: timestamp members that admit 12× the limit, keys Cluster rejects, and logs that stall Redis.
4 min readPromptP
Realtime without lost events: an append-only log and a cursor
How PromptP uses Redis Streams as an append-only log so reconnecting clients replay exactly what they missed, and how per-socket backpressure keeps one slow client from stalling the rest.
2 min readStartupDeckAI
Keep the request path fast: AI generation in BullMQ workers
Generating a pitch deck takes far longer than a web request should. How StartupDeckAI moves analysis and generation into BullMQ workers, with retries, progress and one job per idea.