Skip to content

Multiple connection strings for master-slave demotion/promotion. #830

@robblovell

Description

@robblovell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions