Load Balancing With Riak Ruby Client

Keith Bennett keith.bennett at lmnsolutions.com
Fri May 27 15:20:42 EDT 2011

Hi, all.  If I have several riak servers on a cluster, and want to distribute load fairly evenly, and am using the Ruby Riak client, what is the best way to balance load?

With the HTTP interface, I can randomize the choice of host for a request.  How would I do the same with the ruby client?  Would I create a Riak::Client for each host, and then just randomize the selection of those for a given call?  Do the clients contain any state that would make this a bad idea?  Or is there a better way to do this?


More information about the riak-users mailing list