Running ETCD as master/slave model with two node "cluster"

2,170 views
Skip to first unread message

yunwe...@huawei.com

unread,
Jan 13, 2017, 8:30:57 PM1/13/17
to etcd-dev
I know this sounds a bit odd since ETCD uses the raft algorithm which needs 1+ 2N nodes to form the quorum. but i want to check if anyone has thought about this model and even further if anyone has pioneered with a POC level code change for it.

This model will be useful if, due to limitations of resources, a 3 node cluster cannot be configured. or one just need a master/slave failover like HA model in their environment ( i.e. no needs for member changes etc ).

Thanks
Yunwen



Xiang Li

unread,
Jan 13, 2017, 9:14:13 PM1/13/17
to yunwe...@huawei.com, etcd-dev
etcd will never enable that. Probably you should design a simple primary-backup system instead of relying on etcd? 

If you really like etcd API, you can setup a one member etcd member cluster + one mirrored one member cluster connected by etcd mirror. But you need to handle fail over via loadbalancer and switch the mirror direction yourself. It will be small amount of work.


--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

yunwe...@huawei.com

unread,
Jan 13, 2017, 11:21:29 PM1/13/17
to etcd-dev, yunwe...@huawei.com
Thanks Xiang. Using mirroring might be an attractive way to setup a master/slave model for ETCD. However i think there are a few issues/limitation around mirroring will hinder this solution:
 1. currently ETCD Mirror is 1 direction synchronization of data. so under the failover case, the ETCD mirroring have to reset ( other wise the data wont converge when the mirror site becomes the master ).
  2. Mirror won't ensure data consistency -- i.e. it is a periodically synchronization from master to the slave node. not a real time, strong consistency solution like SQL Server Mirroring for HA.

thoughts / comments ?

thanks
Yunwen
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.

Xiang Li

unread,
Jan 14, 2017, 1:19:32 AM1/14/17
to yunwe...@huawei.com, etcd-dev
currently ETCD Mirror is 1 direction s

As you said, when you detect a failure you can switch direction.

> strong consistency solution like SQL Server Mirroring 


You cannot get consistency and availability at the same time. You choose either consistency or availability. I do not know which SQL HA solution you are talking about, but if they use primary backup then it is basically equal to what mirror does. Or the solution is not HA (if you lose one server, the other one cannot write). You can read about CAP to know more about this. 

We are not interested in exploring primary backup for etcd. We are not interested in supporting any feature that might cause inconsistency for etcd. Basically etcd will never support the 2 node solution you mentioned itself.

If you want, you can build your own solution atop of etcd.

To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages