When we run 2 pods for a redis instance it does balance the load, but it also means that the cached state is no longer shared between pods. This means that a user may get logged out if the connection is made to a pod that their logged in cookie is not associated with.
We can use the constantWP_REDIS_SHARDS to define multiple locations for a redis instance which should let us spread it across pods.
We will need to read the docs linked in the repository above to understand if sharding or replication or....??? is the best option for our needs.
Source
CM
When we run 2 pods for a redis instance it does balance the load, but it also means that the cached state is no longer shared between pods. This means that a user may get logged out if the connection is made to a pod that their logged in cookie is not associated with.
We can use the constant
WP_REDIS_SHARDS
to define multiple locations for a redis instance which should let us spread it across pods.We will need to read the docs linked in the repository above to understand if sharding or replication or....??? is the best option for our needs.