Introduction to Gevent
summary
Gevent is a C-extension networking library that gives greenlets (user‑level coroutines) and uses libev for an event loop plus c-ares for asynchronous DNS; it claims ~60,000 greenlet switches/sec and a single process scaled from ~5,000 to ~10,000 concurrent connections in a real deployment. It monkey‑patches the stdlib so blocking socket and DNS calls become cooperative, provides spawn/pool/timeouts and a WSGI server (keep‑alive missing in older builds), and notes C DB drivers may still block.
AI-written summary · about
chapters (23)
- 0:00Gevent introduction
- 1:11Gevent origins and foundations
- 2:37Gevent 1.0 changes
- 3:18Blocking vs non-blocking sockets
- 5:25Event loops and callbacks
- 6:29Gevent’s multitasking model
- 7:12Coroutines and types
- 8:15Stackful vs stackless coroutines
- 9:18Greenlets and execution context
- 10:43Greenlet performance
- 12:30Gevent’s event loop and libev
- 13:56Hub greenlet and sleep
- 15:43Cooperative sockets
- 16:46Monkey patching
- 18:11Greenlet API and timeouts
- 19:37Greenlet pools
- 20:41Async communication tools
- 21:44Gevent web servers
- 22:47Database drivers
- 23:51Community projects
- 24:56Gevent 1.0 plans
- 25:18Why choose Gevent
- 25:40Q&A
related talks
30mWhat the heck is gevent?
20mIt's Critical: Concurrent programming as a sane programming model
15mWhat The GIL Means For Containers
32mSync vs. Async in Python: Tools, Benchmarks, and ASGI/WSGI Explained
31mInside ASGI The Engine Behind Modern Python Web Frameworks
32masyncio community, one year later
39mStop trying to glue your services together; import lymph
26mDjango 5.0: Elevating Experiences with Server-Sent Events – A Journey from Polling to Real-Time Vibe
