reads/writes during node replacement

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

reads/writes during node replacement

Johnny Tan
When doing a node replace (http://docs.basho.com/riak/1.4.12/ops/running/nodes/replacing/), after commit-ing the plan, how does the cluster handle reads/writes? Do I include the new node in my app's config as soon as I commit, and let riak internally handle which node(s) will do the reads/writes? Or do I wait until the ringready on the new node before being able to do reads/writes to it?

johnny

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: reads/writes during node replacement

Magnus Kessler
On 12 November 2016 at 00:08, Johnny Tan <[hidden email]> wrote:
When doing a node replace (http://docs.basho.com/riak/1.4.12/ops/running/nodes/replacing/), after commit-ing the plan, how does the cluster handle reads/writes? Do I include the new node in my app's config as soon as I commit, and let riak internally handle which node(s) will do the reads/writes? Or do I wait until the ringready on the new node before being able to do reads/writes to it?

johnny


Hi Johnny,

As soon as a node has been joined to the cluster it is capable of taking on requests. `riak-admin ringready` returns true after a join or leave operation when the new ring state has been communicated successfully to all nodes in the cluster.

During a replacement operation, the leaving node will hand off [0] all its partitions to the joining node. Both nodes can handle requests during this phase and store data in the partitions they own. Once the leaving node has handed off all its partitions, it will automatically shut down. Please keep this in mind when configuring your clients or load balancers. Clients should deal with nodes being temporarily or permanently unavailable.

Kind Regards,

Magnus


--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: reads/writes during node replacement

Johnny Tan
Thank you Magnus.

On Mon, Nov 14, 2016 at 7:06 AM, Magnus Kessler <[hidden email]> wrote:
On 12 November 2016 at 00:08, Johnny Tan <[hidden email]> wrote:
When doing a node replace (http://docs.basho.com/riak/1.4.12/ops/running/nodes/replacing/), after commit-ing the plan, how does the cluster handle reads/writes? Do I include the new node in my app's config as soon as I commit, and let riak internally handle which node(s) will do the reads/writes? Or do I wait until the ringready on the new node before being able to do reads/writes to it?

johnny


Hi Johnny,

As soon as a node has been joined to the cluster it is capable of taking on requests. `riak-admin ringready` returns true after a join or leave operation when the new ring state has been communicated successfully to all nodes in the cluster.

During a replacement operation, the leaving node will hand off [0] all its partitions to the joining node. Both nodes can handle requests during this phase and store data in the partitions they own. Once the leaving node has handed off all its partitions, it will automatically shut down. Please keep this in mind when configuring your clients or load balancers. Clients should deal with nodes being temporarily or permanently unavailable.

Kind Regards,

Magnus


--
Magnus Kessler
Client Services Engineer
Basho Technologies Limited

Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com