Skip to content

DATAREDIS-580 - Support Master/Slave connections with ReadFrom settings using Lettuce. #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Oct 13, 2017

We now allow configuration of ReadFrom settings using the Lettuce driver to enable slave reads. If ReadFrom is configured, we opt-in to Master/Slave connections instead of plain connections. Master/Slave connections route commands to the configured type of node depending on whether the command is a read or write command.

LettuceClientConfiguration configuration = LettuceClientConfiguration.builder().readFrom(ReadFrom.SLAVE).build();

ReadFrom is available for:

  • Static Master/Slave Redis without Redis Sentinel
  • Sentinel-Managed Master/Slave Redis
  • Redis Cluster

ReadFrom is not configured for Pub/Sub connections or connections to the actual Sentinel servers.


Related ticket: DATAREDIS-580.

@mp911de mp911de force-pushed the issue/DATAREDIS-580 branch from 09509c2 to 3a5894a Compare November 13, 2017 11:35
mp911de and others added 4 commits November 20, 2017 14:34
…gs using Lettuce.

We now allow configuration of ReadFrom settings using the Lettuce driver to enable slave reads. If ReadFrom is configured, we opt-in to Master/Slave connections instead of plain connections. Master/Slave connections route commands to the configured type of node depending on whether the command is a read or write command.

LettuceClientConfiguration configuration = LettuceClientConfiguration.builder().readFrom(ReadFrom.SLAVE).build();

ReadFrom is available for:

* Static Master/Slave Redis without Redis Sentinel
* Sentinel-Managed Master/Slave Redis
* Redis Cluster

ReadFrom is not configured for Pub/Sub connections or connections to the actual Sentinel servers.
…lass.

Reuse guards to make sure we can use a slave server.
Fix tests not closing connections properly. Remove usage of Optional in constructors, avoid recreating DirectFieldAccessor on every getConnection call and update documentation.
christophstrobl pushed a commit that referenced this pull request Nov 21, 2017
…gs using Lettuce.

We now allow configuration of ReadFrom settings using the Lettuce driver to enable slave reads. If ReadFrom is configured, we opt-in to Master/Slave connections instead of plain connections. Master/Slave connections route commands to the configured type of node depending on whether the command is a read or write command.

LettuceClientConfiguration configuration = LettuceClientConfiguration.builder().readFrom(ReadFrom.SLAVE).build();

ReadFrom is available for:

* Static Master/Slave Redis without Redis Sentinel
* Sentinel-Managed Master/Slave Redis
* Redis Cluster

ReadFrom is not configured for Pub/Sub connections or connections to the actual Sentinel servers.

Original Pull Request: #287
christophstrobl added a commit that referenced this pull request Nov 21, 2017
Fix tests not closing connections properly. Remove usage of Optional in constructors, avoid recreating DirectFieldAccessor on every getConnection call and update documentation.

Original Pull Request: #287
@christophstrobl christophstrobl deleted the issue/DATAREDIS-580 branch November 21, 2017 13:46
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.

2 participants