Grokking Concurrency in Go
0% completed
Worker Pools
Consider a typical incident, described here as an example rather than a measured case. A team writes a program to fetch 5,000 product pages from an internal service that accepts at most a few hundred connections at once. The first version starts one goroutine per URL, since goroutines are cheap. All 5,000 requests arrive at the service within a few milliseconds, the service refuses most of them, and most of the run ends in errors.
The second version starts 20 goroutines and gives them the URLs through one channel
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%