Skip to content

Master discovery frequency #3566

Closed
Closed
@abdhx

Description

@abdhx

Hello 👋,

I am using the Redis-py package to connect to a Redis cluster with Sentinel. I have a question about the best practice for discovering the master node.

Should I:

  1. Use sentinel.master_for each time I execute a command to ensure I'm always talking to the current master?

  2. Discover the master once at startup and cache it, only re-discovering it periodically or upon errors? Do you have an example for this case?

Thank you for your help!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions