DEV Community

Around IT In 256 Seconds

#42: Flow control and backpressure: slowing down to remain stable

Imagine two independent systems communicating with each other. One producing data and the other consuming it. There must be some place where data is buffered. Just in case the producer generated some data but the consumer is currently busy. For example, incoming requests, messages, packets - must wait. Sooner or later, this buffer overflows and either starts dropping data or crashes altogether. Moreover, large buffers imply growing latency between production and consumption. The consumer is perceived less responsive because data waited for a long time in queue. Especially when nothing is prioritized, so first come, first served. Also known as FIFO, first in, first out.

Read more: https://256.nurkiewicz.com/42

Get the new episode straight to your mailbox: https://256.nurkiewicz.com/newsletter

Episode source