karnstack
  • Home
  • Courses
  • Tracks
  • Papers
  • Vote on next
Read
  • Stacktrace
  • Guides
  • Changelog
Unlock every courseSee plans
  • Support
ef51706
  1. Stacktrace
  2. #concurrency
Sign in
All posts
Topic

#concurrency

3 posts

systems
May 27, 20267 min read
#07

The 10ms Tick Under Pingora

Cloudflare's nginx replacement burns through millions of timeouts a second, most of which never fire. Their fix: round every deadline to the next 10ms, share one timer across everyone waiting for that slot, and let a single background thread sweep the whole thing. Result: timeouts that cost 4 nanoseconds instead of 107.

databases
Jan 15, 20268 min read
#03

How Postgres Prevents Both Deadlock AND Livelock in Upserts

A one-line rule buried in PostgreSQL's INSERT ... ON CONFLICT code prevents two of the nastiest concurrency bugs at once: the transaction with the higher XID backs out.

systems
Jan 2, 20266 min read
#02

How nginx Tells Time Without Asking

A lock-free time cache lets millions of nginx requests read the current time without waiting for each other. 64 pre-allocated slots, a memory barrier, and a bet that your thread won't sleep for a full minute.