On Tue, Jan 24, 2012 at 12:34, Michael Clemmons <glassresis...@gmail.com> wrote: > Greg, > Your amazing thanks. In my application its failing on the start of the > application, I do not believe while trying to do a request but its possible > let me grok and get back to you with some trace backs.
Sounds good. I just looked at the code and it "should" lazy-connect. You shouldn't see any failures at setup time. Only when you make a request and it tries to establish te connection. > As far as Im aware to define more than one hostport with the client you > still have to hack the client. Adding an optional hostports or servers > parameter would be simple. Yes. I was focusing on the lower-level code, and didn't hack RiakClient's API. I'm thinking two things: add hostports, and a start_monitor parameter (and code up the latter, of course). > Being able to define the connection manager as a kwarg might be a good > option. If the intent is to define the conextmanager by subclassing the > transport, things make more sense. There are a couple paths to take, at least. The current code says "subclass the transport and override the default_cm classvar". That is sufficient, but maybe there is a better/clearer approach. > I think for multiple nodes round robin > might be the most sane default for longterm or short term connections. It does imply that you'll distribute your request load across the ring. If N clients are running, then this is important (otherwise, all clients would just hit the first node in the config). There are certainly more sophisticated algorithms possible, but the round-robin used right now should work for most users. Note that if a particular request takes a while, the connection is NOT in the ConnectionManager. That will ensure that you don't back up a bunch of future requests behind a single, slow request. Only when the (slow) request completes will the connection be returned to the CM for usage by another request. > Thanks again for replying, I'll see what happens when I try this with > multiple live nodes, and get back with more thoughts. Excellent! Cheers, -g _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com