Description
Hi, I am investigating how to configure Node.Redis (3.1.2) to handle an Elasticache failover (for example when we do a rolling update of settings on our cluster). I specified a 'options.retry_strategy' to return a non-zero 'delay' duration, but for some reason our connection still gets destroyed before our retry_strategy even gets called. When this happens, the 'options' parameter that gets passed into our retry_strategy callback is this:
{"attempt":1,"error":null,"total_retry_time":0,"times_connected":1}
I'm aware of the 'enable_offline_queue' option but I see that the default value is 'true' so I'm not specifying it explicitly.
I'm also aware of the 'retry_unfulfilled_commands' option but it comes with this warning:
"Use this with caution if you use state altering commands (e.g. incr). This is especially useful if you use blocking commands."
I'm nervous about using this in a production environment without any additional information.
So is there a combination of flags/options that will detect that a failover happened and buffer redis commands until a connection to a backup is established?
Thanks in advance,
Jeff