-
Notifications
You must be signed in to change notification settings - Fork 470
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
Load balancing/connection pooling #978
Comments
Regarding the HAProxy (LB) method in general, there needs to clarification on configuration i.e. should there be concerns about session affinity, what are the best timeout settings to use, what balancing strategy should be utilized etc.. Really excited to see how this pans out. Making clients only need to be aware of a single endpoint to access a replica set is definitely awesome. EDIT: Probably don't exactly need session affinity since CockroachDB supports distributed transactions (nice!). Although I'm not sure how authentication would work etc.. |
- Add docs on using `cockroach gen haproxy` - Add HAProxy load balancing to manual deployement docs; fixes #1203 - Add GCE managed load balancing to GCE deployment docs - Add AWS managed load balancing to AWS deployment docs - Add Azure managed load balancing to Azure deployment docs - Add Digital Ocean managed load balanced to DO deployment docs Partially address #978; might still add docs on configuring client drivers to connect to multiple node URLs
- Add docs on using `cockroach gen haproxy` - Add HAProxy load balancing to manual deployement docs; fixes #1203 - Add GCE managed load balancing to GCE deployment docs - Add AWS managed load balancing to AWS deployment docs - Add Azure managed load balancing to Azure deployment docs - Add Digital Ocean managed load balanced to DO deployment docs Partially address #978; might still add docs on configuring client drivers to connect to multiple node URLs
- Add docs on using `cockroach gen haproxy` - Add HAProxy load balancing to manual deployement docs; fixes #1203 - Add GCE managed load balancing to GCE deployment docs - Add AWS managed load balancing to AWS deployment docs - Add Azure managed load balancing to Azure deployment docs - Add Digital Ocean managed load balanced to DO deployment docs Partially address #978; might still add docs on configuring client drivers to connect to multiple node URLs
- Add docs on using `cockroach gen haproxy` - Add HAProxy load balancing to manual deployement docs; fixes #1203 - Add GCE managed load balancing to GCE deployment docs - Add AWS managed load balancing to AWS deployment docs - Add Azure managed load balancing to Azure deployment docs - Add Digital Ocean managed load balanced to DO deployment docs Partially address #978; might still add docs on configuring client drivers to connect to multiple node URLs
Status:
To do:
|
Instead of implementing load balancing in every client driver, which is difficult to maintain, why not do what RethinkDB did and let the cockroach binary have a |
@alanhamlett, thanks for the suggestion! Since it is a feature request, would you mind opening an issue in the |
PostgreSQL driver already has this feature, at least the Java version.
Coupled with a pool connection (like HikariCP), you could have, by instance, 10 open connections dispatched between n nodes. |
@awoods187, @knz, @bdarnell, since this issue was opened, we added quite a bit of guidance around load balancing: That links out to environment-specific load balancing guidance in our deployment tutorials. Our docs still don't cover driver-level connection pooling. Is this something we should consider for 2.2 docs? |
I think any further changes in this area are probably low-priority; we've covered the important stuff (and we're recommending managed load balancers in most cases which should be reliable). The main thing that would be left would be to talk about running two HAProxy instances for the manual deployment case, and balance between them on the client side. |
Given @bdarnell's last comment, closing this for now. |
We should document multiple strategies with code samples in various langauges.
Possible strategies to cover (taken from @arjunravinarayan's response to this forum post):
2 and 3 seamlessly take advantage of cluster changes (e.g., a cockroach cluster growing to more nodes, or migrating nodes), without needing clients to be aware.
Related: #448
The text was updated successfully, but these errors were encountered: