Skip to content

Use multiple connections #10

@wnkz

Description

@wnkz

Hey,
At the moment, this gem only uses the first server from the array we pass, I think it would be very useful to use all of them because sometime under heavy load or when running a lot of request in a short duration, queries ended up failing.
I think it's not because the cluster cannot process the request but simply because of HTTP requests saturation.

I'm willing to work on a patch for this but I'd like your approval first ; mostly to know if it's recommended to run queries directly on secondary nodes while queries are running on the primary. I'm pretty sure it works, but I'm not sure it's recommended.

What I have in mind right now (didn't start coding anything):

  • Retry on a different server if request fails
  • Simple load balancing (round roaming)
  • (Maybe) Advanced load balancing depending on the individual load of each node of the cluster (if possible)

Let me know what you think,
Cheers,

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions