Skip to content

Commit 2232352

Browse files
committed
docs(platform): document how to isolate etcd
1 parent f886695 commit 2232352

5 files changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The Deis Control Plane, Data Plane, and Router Mesh components all depend on an
2+
etcd cluster for service discovery and configuration.
3+
4+
Whether built for evaluation or to host production applications, when managing a
5+
small Deis cluster (three to five nodes), it is reasonable to accept the
6+
platform's default behavior wherein etcd runs on every node within the cluster.
7+
8+
In larger Deis clusters however, running etcd on every node can have a
9+
deleterious effect on overall cluster performance since it increases the time
10+
required for nodes to reach consensus on writes and leader elections. In such
11+
cases, it is beneficial to isolate etcd to a small, fixed number of nodes. All
12+
other nodes in the Deis cluster may run an etcd proxy. Proxies will forward
13+
read and write requests to active participants in the etcd cluster (leader or
14+
followers) without affecting the time required for etcd nodes to reach consensus
15+
on writes or leader elections.
16+
17+
.. note::
18+
19+
The benefit of running an etcd proxy on any node not running a full etcd
20+
process is that any container or service depending on etcd can connect to
21+
etcd easily via ``localhost`` from any node in the Deis cluster.
22+
23+
Also see `CoreOS cluster architecture documentation`_ for further details.
24+
25+
.. _`CoreOS cluster architecture documentation`: https://coreos.com/os/docs/latest/cluster-architectures.html#production-cluster-with-central-services

docs/managing_deis/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Managing Deis
2020
platform_logging
2121
platform_monitoring
2222
production_deployments
23+
isolating-etcd
2324
recovering-ceph-quorum
2425
running-deis-without-ceph
2526
security_considerations
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
:title: Isolating etcd
2+
:description: Configuring the cluster to isolate etcd
3+
4+
.. _isolating-etcd:
5+
6+
Isolating etcd
7+
==============
8+
9+
.. include:: ../_includes/_isolating-etcd-description.rst
10+
11+
.. note::
12+
13+
The approach documented here works as of Deis 1.9. Older versions of Deis
14+
utilize an older version of etcd that did not include the proxy
15+
functionality.
16+
17+
cloud-config
18+
------------
19+
20+
To realize the topology described above, it is necessary, at the time of
21+
provisioning, to provide different cloud-config for those hosts that will run
22+
etcd and for those that will only run an etcd proxy.
23+
24+
For the small, fixed number of hosts running full etcd and satisfying the
25+
"central services" role (as described in the CoreOS documentation), the
26+
cloud-config provided with Deis is sufficient.
27+
28+
For hosts running only an etcd proxy, satisfying the "worker" role (as described
29+
in the CoreOS documentation), cloud-config must be tweaked slightly to include
30+
the ``-proxy on`` flag. For example:
31+
32+
.. code-block:: yaml
33+
34+
#cloud-config
35+
---
36+
coreos:
37+
# ...
38+
- name: etcd.service
39+
command: start
40+
content: |
41+
# ...
42+
[Service]
43+
# ...
44+
ExecStart=/usr/bin/docker run --net=host --rm \
45+
# ...
46+
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
47+
# ...
48+
--discovery <discovery url here> \
49+
-proxy on
50+
# ...
51+
# ...
52+
# ...
53+
# ...
54+
55+
Isolating etcd as described here requires subsets of a cluster's hosts to be
56+
configured differently from one another (including or excluding the
57+
``-proxy on`` flag). Deis provisioning scripts do not currently account for
58+
this, so managing separate cloud-config for each subset of nodes in the cluster
59+
is left as an exercise for the advanced operator.

docs/managing_deis/production_deployments.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ Production deployments
99
Many Deis users are running Deis quite successfully in production. When readying a Deis deployment
1010
for production workloads, there are some additional (but optional) recommendations.
1111

12+
Isolating etcd
13+
--------------
14+
15+
.. include:: ../_includes/_isolating-etcd-description.rst
16+
17+
See :ref:`isolating-etcd` for further details.
18+
1219
Running Deis without Ceph
1320
-------------------------
1421

docs/understanding_deis/architecture.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@ For small deployments you can run the entire platform
7272
-- Control Plane, Data Plane and Router Mesh -- on just 3 servers.
7373
For larger deployments, you'll want to isolate the Control Plane and Router Mesh,
7474
then scale your data plane out to as many servers as you need.
75+
76+
The Deis Control Plane, Data Plane, and Router Mesh components all depend on an
77+
etcd cluster for service discovery and configuration. For larger deployments,
78+
you'll want to isolate this as well.
79+
80+
Those building larger clusters should reference :ref:`isolating-etcd` for
81+
further details.

0 commit comments

Comments
 (0)