Async vs Sync Programming
summary
Compares blocking vs nonblocking servers with concrete costs and tradeoffs: a CPU time slice ~100 ms, context switches cost roughly 3–30 µs, Java thread stack defaults to 1 MB stack so 200 threads ≈ 200 MB, and Jetty defaults to 200 threads. Shows async uses epoll/event-loop, futures or actors to keep fewer threads but pushes complexity into tracing, per-request context, queue sizing, and monitoring (New Relic has limited async support). Claims async improves concurrency and fault tolerance for I/O-bound services but often adds engineering and observability costs.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 4:54Sync system problems
- 15:19Async approach benefits
- 26:18Async real benefits
- 33:46When to use sync code
- 41:52Async programming models
- 42:13Conclusion
related talks
51mThe Need for Async
01h 31mHistory of Time: Asynchronous C++
37mConcurrency options on the JVM
01h 03mBuilding responsive and scalable applications
52mSynchronous and Asynchronous Programming - Two Worlds You Can Combine
01h 01mMultithreading vs Asynchronous Programming: The Architectural Shift
50mVirtual Threads, Structured Concurrency, Extent Locals: When to Use Them & How
42mThreading versus Evented
