Redis Distributed Locks in Python: SET NX, Redlock, Fencing Tokens
A Redis lock is a timed lease: this post breaks one with a stall, then makes Postgres reject the stale writer with a fencing token, with measured lost updates.
A Redis lock is a timed lease: this post breaks one with a stall, then makes Postgres reject the stale writer with a fencing token, with measured lost updates.
An LLM gateway is failure handling on one request path: routing, retries, a circuit breaker, streaming fallbacks and per-tenant budgets, with a FastAPI gateway you can run and the numbers its tests measured.
Six rate limiting algorithms run through the same 100-a-minute limit and the same traffic, with what each let through, what it costs in Redis, and atomic Lua code for Python.
A timeout can’t tell you whether the card was charged, so an idempotency key lets the retry get the original result back instead of charging twice.