couchbase / kubernetes

Deprecated. Please use the Couchbase Autonomous Operator
https://www.couchbase.com/products/cloud/kubernetes
43 stars 15 forks source link

Simplify architecture #29

Open tleyden opened 9 years ago

tleyden commented 9 years ago

The k8s-etcd-cluster repo might provide a hint on how to simplify the architecture:

What we need to do is therefore make sure that our cluster doesn't rely on the external service when it's up & running, so that new units of service can join or leave the cluster without endangering the service.

The idea is to use one of the default service patterns proposed by k8s in the documentation: first we create a "seed" service that contains X nodes of etcd that are part of the first cluster bootstrapped with the discovery service. Then we add units to the cluster and groups them under a secondary service which we call "unit". When the "unit" service has scale to 3 or more nodes, we destroy the first "seed" service. Any unit that gets added then joins the cluster using only k8s primitives, and is not aware of the discovery mechanim used to bootstrap the cluster. We end up with a scalable, HA service, completely autonomous and horizontally scalable (up & down).

Note: This pattern is used in the Redis cluster implementation in the documentation.

arun-gupta commented 9 years ago

@aronchick this would be useful for our discussion.