Re:Buffered Channels in Go: Tips and Tricks
by kasey_junk on Monday January 15, 2018 @10:08AM
(#16150921)
Batching is the important distinguisher here. The downstream should read as many events as possible and handle them together.
If you have 1:1 producer/consumer and they are doing 1:1 events to output, almost always I think people have gone concurrent when they shouldn't.
I agree that a small buffer can smooth out latency issues on the consumer side only, and that requires both sides to be reasonably similar in frequency of the latencies are disproportionately large compared to the unit of work. But that requires a lot of live metrics to capture.
I still believe that unbuffered is the way to go.