> I figure that we are talking about two different and orthogonal types of > partition here. Agreed.
> > I'm happy to call the way that nodes are linked into buddy-groups > (groups of peers that store replicated state for each other) something > other than 'partition', if we want to reserve that term for some sort of > cluster management concept, but you do agree that these structures > exist, do you not ? regardless of what they are called, otherwise you do > not scale, as we have all agreed. > > As for loadbalancer configuration I think this will draw upon both > 'jeremy-partition' and 'jules-buddy-group' status as : > > - you only want to balance requests for a webapp to nodes on which it is > deployed Yes > - you only want to fail-over requests to other nodes in the same > buddy-group as the failed node Ideally, yes but this is not essential. See below. > > if you can do the latter you can avoid cluster-wide logic for findg and > migrating sessions from remote nodes to the one receiving the request, > because you can guarantee that the session is already there. The price to pay for this is that you always need to replicate state to any node to which the request may be directed. If you allow for a locate phase, then you can minimise the set of nodes to which data is replicated (the buddy-group) because any node can find it later. In a high-affinity configuration this reduces the overall load. Consider a four node partition A,B,C,D. In the 'replicate-everywhere' model, A's state is replicated to three other nodes after every request, incurring the processing cost on three nodes (assuming network multicast). If A dies, any node can instantly pick up the work. The issue is we have a lot of overhead to reduce the latency in the event of node death (which we hope is infrequent). The other alternative is that every session has one and only one buddy. This would result in 1/3 of A's sessions being replicated to B, 1/3 to C and 1/3 to D. Each session is replicated to just one node, allowing unicast to be used (which has a lower overhead than multicast) and only incurring the ongoing processing cost on one node. If A dies, then B,C,D pick new buddies for A's sessions and do bulk state transfer to redistribute, ensuring that the state is always stored on two nodes. Say B transfers to C, C to D and D to B. Again, unicast transfer. You can avoid this if you are willing to lose a session if another node dies (double failure scenario). An A request is now directed to a random node; if this node has the state, then it becomes the primary and starts replicating to its buddy. If it does not, then it sends a multicast inquiry to the partition, locates the state, does a second transfer and starts replicating again. The trade off is lower overhead whilst running but a larger state transfer in the event of node death. I tend to prefer the latter on the basis that node deaths are infrequent. > > Are we getting closer ? > :-) -- Jeremy
