Python for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists A health checker that visits 200 endpoints one at a time takes 200 times as long as it needs to, because almost all of its time is spent waiting for the network. Python offers three tools for this…
Python for DevOps: Concurrency Measured, Threads, asyncio, Processes, Locks and Timeouts
Check many hosts fast and know why it works: measured speedups for threads and asyncio on waiting work, why threads do nothing for CPU work while processes do, lost updates from a race condition and the lock that fixes them, per-task error handling, concurrency limits and timeouts.
Sign in free to read this script, along with the rest of the library.
Sign in free