StackExchange / StackExchange/StackExchange.Redis

Optimal way to configure Hosts on AWS Elasticache, non-clustered, multiple read replicas

Open
#1,866 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

☁️ platform:AWS
Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

My question:
In StackExchange.Redis hosts are configured as a list. Will adding only the two AWS managed primary and "read-only" endpoints to the host list result in the expected behavior that requests distribute over all replicas?

or would we have to explicitly list all five nodes' addresses in the list to have that expected behavior?

ie. is there any DNS lookup optimization, ip caching, etc that would prevent each request from being round-robin'd by AWS' endpoint?

Context:

  • in AWS Elasticache
  • cluster mode disabled
  • one primary and four full read-replicas
  • the Redis version is >= 3.1 and <= 5.0
  • PreferReplica or DemandReplica command flags are used when we want to stay off the primary node

Background:
In late 2020, AWS updated Elasticache Redis features to provide a single dns managed primary endpoint and a single read-only endpoint. The advantages of these are:

  • AWS automatically manages DNS changes when they perform automatic primary-failover and node changes
  • the RO endpoint provides a single configuration value, allowing additional readers to be added without requiring pushing configuration to the apps accessing them
  • the RO endpoint performs DNS round-robin distribution to the active read-only nodes

AWS Elacticache Redis - Endpoints Docs

Thanks for the amazing package and time reading my question!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AWS ElastiCache Endpoints documentation and StackExchange.Redis host-list behavior described in the issue. Determine whether configuring the primary and read-only endpoints provides the expected replica distribution and failover behavior; done means documenting the answer and any required endpoint configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp, redis
Domain
cloud, databases
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.