question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rfc - a preferred slave list in a sentinel setup

See original GitHub issue

We want to run a sentinel setup:

  • each webserver has it’s own redis slave (will NOT become master - using slave-priority = 0)
  • a set of sentinels running to protect us from partioning and handle the quorum
  • a master and a few redis slaves for failover of master

In the current implementation , the slaves can be selected using the role slave but it picks a rather arbitrary slave. We would propose to have a way to indicate a list of preferred slaves for a client.

This is useful is in multi-AZ aws setups, where we want to keep the latency to app<->slave low . A new syntax could look like:

var redis = new Redis({
  sentinels: [{ host: 'localhost', port: 26379 }, { host: 'localhost', port: 26380 }],
  preferred_slaves: [ { prio: 10 , host: 'localhost', port: 6381 }]
  name: 'mymaster'
});

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
luincommented, May 19, 2015

Makes sense. Besides a list of preferred slaves, I think we may also accept a function to let user pick up the slave:

var redis = new Redis({
  sentinels: [{ host: 'localhost', port: 26379 }, { host: 'localhost', port: 26380 }],
  preferredSlaves: function (availableSlaves) {
    return _.sample(availableSlaves);
  },
  name: 'mymaster'
});
0reactions
doublesharpcommented, Sep 24, 2016

@tangxinfa @jedi4ever this is now included in 2.4.0 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

draft-ietf-dnsop-kskroll-sentinel-14 - A Root Key Trust Anchor ...
A Root Key Trust Anchor Sentinel for DNSSEC (Internet-Draft, 2018) ... RFC 8145 relies on resolvers reporting towards the root servers a list...
Read more >
Proposed Standard - RFC Search Detail
Number Files Date RFC 9343 HTML, TEXT, PDF, XML December 2022 RFC 9324 HTML, TEXT, PDF, XML December 2022 RFC 9339 HTML, TEXT, PDF, XML December...
Read more >
8. Configuration Reference — BIND 9 9.18.8 documentation
Defines a named list of servers for inclusion in stub and secondary zones' primaries or also-notify lists. (Note: this is a synonym for...
Read more >
RFC Index
9193, PRO, Sensor Measurement Lists (SenML) Fields for Indicating Data Value ... 8598, PRO, Split DNS Configuration for the Internet Key Exchange Protocol ......
Read more >
Sophos UTM
Sophosprovidesa list of hardware devicescompatible with UTM Software. ... Slave: The standbysystem in a hot standby/cluster setup which takesover ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found