<div dir="ltr">Hello,<div>I wonder if there are any best practices on using Riak cluster from Erlang services, such as Cowboy web services.</div><div><br></div><div>For example</div><div>- use riakc protobuf client or join services and Riak ring in a common erlang cluster with the same cookie?</div><div>- open a new connection from riakc to Riak node on each hit or keep a connection pool? I suppose it should be the pool as sockets are finite.</div><div>- on every request connect to a random Riak node from the ring? Or use dedicated Riak nodes for each service instance, if there are many?</div><div>- what to do with the new nodes which are joining the ring and the ones which are removed from the ring? What is the more or less standard way to notify clients about this? </div><div>- what to do in a client if a Riak node temporarily goes offline? Keep trying to connect to such node until it gets online again? This would obviously hit latency unless there's a special dedicated process for this.</div></div>