We are running a 3-node mcrouter
/memcached
kubernetes
deployment (through helm
) on a Google Cloud cluster. We are using a cluster instead of a single VM to make our web app (which uses memcache for sessions) resilient to node failure.
When updating nodes kubernetes evicts the pods one by 1 and generates new ones. Since memcache is an in-memory store, these new pods are created empty of data. The mcrouter routes which we currently use are not optimal for this situation as evidenced by intermittent session failures during an upgrade.
As far as I understand, there are 2 ways to deal with this:
WarmUpRoute
MissFailoverRoute
If I want to use WarmUpRoute
then I need to do this:
If I want to use a MissFailoverRoute
then I need to do this:
Do I understand this correctly? It seems that the second option is much simpler. Are there any advantages to the WarmUpRoute
method? Is there a third option that would work better than these two?