Tech
Bounding Concurrency in Go: errgroup, Worker Pools, and Backpressure
Unbounded fan-out is the default failure mode of Go concurrency: every go statement is one more task in flight, with no ceiling and no owner. This article is about giving both.
Cancellation and bounding are separate controls. Cancellation decides when work stops; bounding decides how much of it exists at once. A service can cancel perfectly and still fall over because ten thousand goroutines each decided, independently, that now was a good time to call the database.
The pages around this...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to