Github user gdfm commented on the pull request:

    https://github.com/apache/flink/pull/1069#issuecomment-137096426
  
    @tillrohrmann the reason why 2 is a "magic number" is the following.
    Immagine channels as containers, and the load (the incoming data stream) as 
a liquid.
    When a key is split in two channels, it creates a "bridge" between these 
channels.
    You can imagine it as a pipe between the two specific containers that 
enables sharing the load, and brings the liquid to the same level (this happens 
thanks to the fact that the new messages are sent to the least loaded of the 
two containers).
    Now, if you have enough of these pipes between pairs of containers, you 
will effectively establish a network of load sharing among them. Any increase 
in pressure on one of the containers can be shared across the network 
effectively, which brings the load balance.
    The trick is to have "enough" keys to create enough pipes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to