Scott,

It is generally safe to use the Ruby client from multiple threads. A
few items that are infrequently touched (memoized buckets and their
properties) are not, but normal requests are all handled by a
thread-safe connection pool. Ripple historically kept a client in the
thread-locals in order to have a sort of globally-referrable Client
instance; similar to how ActiveRecord's connections work, but not as
sophisticated. This could be improved in the future, perhaps
instantiating it in the Railtie instead to be used by all threads.

On Mon, Nov 12, 2012 at 5:01 PM, Scott Hyndman <sc...@blutrumpet.com> wrote:
> Hi there,
>
> I noticed this post from a bit over a year ago
> (http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-June/004592.html),
> and wondered whether this was still the case. I've noticed one detail
> suggesting that it may be (the fact that Ripple creates a client per
> thread), and one that contradicts (the existence of HTTP and PB connection
> pools on the client).
>
> Can anyone shed some insight?
>
> Scott
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>



-- 
Sean Cribbs <s...@basho.com>
Software Engineer
Basho Technologies, Inc.
http://basho.com/

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to