Skip to content

Redis read-only replica support - #1019

Merged
gthess merged 11 commits into
masterfrom
features/redis-replica
Apr 4, 2025
Merged

gthess merged 11 commits into
masterfrom
features/redis-replica

Conversation

@gthess

@gthess gthess commented Feb 23, 2024

Copy link
Copy Markdown
Member

This PR introduces a Redis replica server next to an Redis server that is assumed to be in read-only mode.
If configured, Redis read commands will go there while write commands will go to the non-replica server.
All connectivity options are duplicated for the replica server.
Redis tests are not yet implemented.

@gthess gthess self-assigned this Feb 23, 2024
@madnuttah

madnuttah commented Feb 23, 2024 •

Copy link
Copy Markdown

Hi @gthess, does this imply this workaround for dockerized Unbound ain't necessary anymore then?

@gthess

gthess commented Feb 27, 2024

Copy link
Copy Markdown
Member Author

Hi @madnuttah, I am not sure what the workaround is in that link but I see no relation with this feature. This feature adds support for Unbound to issue all read commands to a Redis replica server, offloading most of the of the work from the main Redis server which will only be issued write commands.
Does that answer your question?

@madnuttah

Copy link
Copy Markdown

Thanks for making it clear!

@gthess
gthess marked this pull request as ready for review December 31, 2024 15:12
@gthess

gthess commented Dec 31, 2024

Copy link
Copy Markdown
Member Author

There was some time investment to bring this up to speed with recent changes so I think it is time to merge to avoid the same time investment in the future.
Since this is a PR already, I'll wait for a review before squash merging.

@gthess
gthess requested a review from wcawijngaards December 31, 2024 15:16

@wcawijngaards wcawijngaards left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks okay! Nice to have a unit test for redis.

Comment thread cachedb/redis.c Resolved
Comment thread cachedb/redis.c Resolved
Comment thread doc/example.conf.in Resolved
gthess and others added 2 commits April 4, 2025 10:08
Co-authored-by: Wouter Wijngaards <wcawijngaards@users.noreply.github.com>
@gthess

gthess commented Apr 4, 2025

Copy link
Copy Markdown
Member Author

Thanks for the review and catching the context bug!

@gthess
gthess merged commit 90243a6 into master Apr 4, 2025
@gthess
gthess deleted the features/redis-replica branch April 4, 2025 08:20
gthess added a commit that referenced this pull request Apr 4, 2025
- Merge #1019: Redis read-only replica support.
  Introduces new 'redis-replica-*' options for the Redis cache backend.
jedisct1 added a commit to jedisct1/unbound that referenced this pull request Apr 24, 2025
* nlnet/master: (49 commits)
  - Tag for 1.23.0rc2. This became the release of 1.23.0 on 24 April   2025. The code repository continues with 1.23.1 in development.
  - Increase default to `num-queries-per-thread: 2048`, when unbound is   compiled with libevent. It makes saturation of the task queue more   resource intensive and less practical. Thanks to Shiming Liu,   Network and Information Security Lab, Tsinghua University for the   report.
  Changelog entry for NLnetLabs#1265: - Merge NLnetLabs#1265: Fix WSAPoll.
  Fix WSAPoll (NLnetLabs#1265)
  Changelog entry for NLnetLabs#1265: - Merge NLnetLabs#1265: Fix WSAPoll.
  Fix WSAPoll (NLnetLabs#1265)
  - Fix for print of connection type in log-replies for dot and doh.
  - Fix NLnetLabs#1264: unbound 1.22.0 leaks memory when doing DoH.
  - Fix to detect if atomic_store links in configure.
  - Fix fast_reload to print chroot with config file name.
  - Update to the manpage for the fast_reload part.
  - Tag for 1.23.0rc1.
  - More explicit text about memory usage during fast_reload.
  Changelog entry for NLnetLabs#902: - Merge NLnetLabs#902: DNS Error Reporting (RFC 9567). Introduces new   configuration option 'dns-error-reporting' and new statistics for   'num.dns_error_reports'.
  DNS Error Reporting (RFC 9567) (NLnetLabs#902)
  - Fix to update common.sh for speed of kill_pid.
  - Fix test to speed up common.sh script kill_pid.
  Fix typo in Changelog entry.
  Changelog entry for NLnetLabs#1019: - Merge NLnetLabs#1019: Redis read-only replica support.   Introduces new 'redis-replica-*' options for the Redis cache backend.
  - Fix redis_replicat test for unused option defaults and log printout.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants