What the heck is gevent?
summary
Gevent is a coroutine-based concurrency layer that uses greenlets and runtime monkey patching to make blocking libraries yield, letting Python microservices increase throughput (Lyft measures ~12x in benchmarks) but creating hidden correctness and scheduling risks. Specific failures: bike/scooter offers flicker because a pricing endpoint hits a 500 ms per-mode deadline and 0.5% of requests drop; isolating the endpoint to dedicated hosts raises reliability from ~2.5 nines to ~4.5 nines. Beware mixing CPU work and I/O — p99s can triple as greenlet count rises.
AI-written summary · about
chapters (8)
- 0:00Intro
- 1:21What is gevent
- 4:40Core routines
- 6:21Cooperative multitasking
- 7:23Monkey patching
- 8:08Cooperative routines
- 8:50Code examples
- 16:51Performance
related talks
34mIntroduction to Gevent
34mIntroduction to Gevent
54mEmulating Stackless and greenlet with each other
15mWhat The GIL Means For Containers
41mDetecting and Fixing Unbound Concurrency Problems
54mEmulating Stackless and greenlet with each other
27mProduction Ready Concurrency
15mMonoceros: Faster and Predictable Services through In-pod...
