proudcity / wp-proudcity

The ProudCity WordPress platform
https://proudcity.com
Other
21 stars 9 forks source link

Redis Sharding #2489

Open curtismchale opened 4 months ago

curtismchale commented 4 months ago

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.