Skip to content
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

Configuring connections for reading and writing in the same cluster #43

Open
raffian opened this issue Oct 3, 2014 · 0 comments
Open

Comments

@raffian
Copy link

raffian commented Oct 3, 2014

The documentation says NOT to use multiple connections for redis instances in the same cluster, but we have a use case where we must write to a master (obviously) in one data center while making sure "reads" go to a different data center, but both instances belong to the same cluster name.

To address this, we set up F5 with virtual host names with rules using webdis "/info" to find the master for writing, and the nearest redis instance for reading. We configure the application using the virtual host names like this:

grails {
   redis {
      port = 6379
      host = 'dataCenter1-RW' 
      poolConfig {
         maxTotal = -1
      }
      connections {
         readOnly {
            poolConfig {
               maxTotal = -1
            }
            port = 6379
            host = 'dataCenter1-RO'
         }
      }
   }
}

Is this a valid configuration? It seems to work fine, although we have not performed serious testing on it.

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

No branches or pull requests

1 participant