← richiebachala.com

Pattern 3 of 5

Parallelization

All at once — N independent calls complete in the time of one.

Sequential Parallel 4× faster Input Column 1 Column 2 Column 3 Column 4 describe describe describe describe Output Add a semaphore (e.g. max_concurrent=10) to stay within API rate limits

What to watch: Sequential vs parallel — in the first half the same 4 calls complete one at a time (slow, grey). In the second half all 4 run concurrently (green). A semaphore caps concurrent calls to stay within API rate limits.