Multiple connection strings for master-slave demotion/promotion.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 40
Description
On ElasticCache, a redis cluster has one primary master read/write node and several secondary slave read-only nodes. The redis cluster periodically switches roles for nodes, exchanging master and slave nodes. The connection string to the ElasticCache is to the primary node when writes are needed. The createClient should be modified to take more than one connection port and host pair, and try each one in turn when an error like "Can't save packet:Error: READONLY You can't write against a read only slave." occurs so that the client can recover if the primary is switched while in operation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the createClient entry point and the connection and error-handling paths it uses. Determine how multiple host/port pairs and the Redis READONLY error should be handled, then verify that the client can retry against another endpoint after a primary/secondary role switch. The payload names no files or tests, so repository exploration is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, redis, typescript
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100