8000 Can cluster slots be cached beyond request lifecycle? · phpredis phpredis · Discussion #2456 · GitHub
[go: up one dir, main page]

Skip to content

Can cluster slots be cached beyond request lifecycle? #2456

Answered by michael-grunder
gskema asked this question in Q&A
Discussion options

You must be logged in to vote
  1. redis.clusters.cache_slots uses PHP's persistent_list mechanism, which survives multiple requests. It will live until we invalidate it (e.g. PhpRedis receives a MOVED response from the cluster). It's important to note however, that each PHP-FPM worker will have it's own cache. So if you have 8 workers, they all need to warm up but at that point, you shouldn't see additional calls to CLUSTER SLOTS.
  2. redis.pconnect.pooling_enabled enables persistent connection pooling. RedisCluster will use the pool if persistent connections are requested in the constructor..
  3. redis.clusters.persistent is just used when connecting to "named" clusters which can be specified in php.ini. To my knowledge this fe…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by gskema
Comment options

You must be logged in to vote
2 replies
@michael-grunder
Comment options

@gskema
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
0