Hi Sean, Thank you very much for your answer. So although I put 5 nodes in the connection string, only 1 would be use for the overall process (PUT, PUT, PUT, GET, etc...) until the end of the execution.
My second question was, if I have 5 nodes initially and i put them on my connection string, and later I put 2 more nodes in the server but I didn't put them in the connection string, would those 2 new nodes be available in the pool? or only the ones specified? Thanks, Alex On Wed, Jun 25, 2014 at 4:34 PM, Sean Cribbs <[email protected]> wrote: > Alex, > > No, it will only randomize the node when *opening* a connection. After > that, it just uses what is first available in the pool. > > We have an outstanding plan to support auto-configuring clients, but that > work did not make it into the 2.0 cycle. > > > On Wed, Jun 25, 2014 at 7:18 AM, Alex De la rosa <[email protected]> > wrote: > >> Hi there, >> >> Using the Python client, in the documentation I can read this: >> >> "The client maintains a connection pool behind the scenes, one for each >> protocol. Connections are opened as-needed; a random node is selected when >> a new connection is requested." >> >> Imagine that I create my connection like this: >> >> client = riak.RiakClient(protocol='pbc', nodes=[{'host':'X.X.X.1', >> 'http_port':8098,'pb_port':8087},{'host':'X.X.X.2','http_port':8098, >> 'pb_port':8087},{'host':'X.X.X.3','http_port':8098,'pb_port':8087},{ >> 'host':'X.X.X.4','http_port':8098,'pb_port':8087},{'host':'X.X.X.5', >> 'http_port':8098,'pb_port':8087}]) >> >> Specifying the 5 servers in my cluster... Every time that do a request >> (PUT/GET/DELETE) is going to use a randomized host from the list? Also... >> what if for example I add server X.X.X.6 and X.X.X.7? do I have to manually >> edit my connection string to reflect those changes? Is there a way to >> automatically use any node in the cluster without having to specify them >> manually? >> >> Thanks, >> Alex >> >> _______________________________________________ >> riak-users mailing list >> [email protected] >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> >> > > > -- > Sean Cribbs <[email protected]> > Software Engineer > Basho Technologies, Inc. > http://basho.com/ >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
