上QQ阅读APP看书,第一时间看更新
Slow producer and fast consumer
Let's start with the simplest one. Suppose that we have a slow producer and very fast consumer. This situation may arise because of some lean assumptions from the producer's side about an unknown consumer.
On the one hand, such configurations are a particular business assumption. On the other hand, the actual runtime might be different, and the possibilities for the consumer may change dynamically. For example, we may always increase the number of producers by scaling them, thereby increasing the load onto the consumer.
To tackle such a problem, the essential thing that we need is the actual demand. Unfortunately, the pure push model can't give us such metrics, and therefore dynamically increasing the system's throughput is impossible.