I use a type of “sticky sessions” and my client sessions should always be forwarded to the same instance.
Specifically I achieve sticky sessions via consistent hashing. As a result of consistent hashing, scaling up or down does not invalidate the entire hash map (and thus the data depending on that hash map). Only a small percentage of the hash map is invalid in the case of scale up or down.
Docker has assumed that just because I want a hostname to resolve to multiple IP addresses (via DNS lookup and dnsrr), I also want those IP addresses to be shuffled in a round robin fashion each time the hostname is looked up. That assumption is causing me problems. Specifically that assumption is screwing up the consistent hashing algorithm, which depends on the IP addresses in the list AS WELL AS the order of the address.
I can’t go into detail about my reasons for doing this, other than to say I know what I am doing and I have good reasons for doing so. I will not have the load balancing problems that you are trying to warn me about (I am well aware of them). And I do appreciate your warning me.
As I understand Docker, the default exposure of a service is vip (virtual ip). The user can change that to dnsrr. I wand the dns part, but not the rr part. Is there some way to achieve the dns without the rr??
In my basic searching, this is trivial in kubernetes. Im trying to stick to Docker though.