Skip to content

Commit 86baab3

Browse files
whoshuujoaofnfernandes
authored andcommitted
Add DTR health check explanations
1 parent 30faaa3 commit 86baab3

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ description: Learn how to configure a load balancer to balance user requests acr
44
keywords: docker, dtr, load balancer
55
---
66

7-
Once you’ve joined multiple DTR replicas nodes for high-availability, you can
8-
configure your own load balancer to balance user requests across all replicas.
7+
Once you’ve joined multiple DTR replicas nodes for
8+
[high-availability](set-up-high-availability.md), you can configure your own
9+
load balancer to balance user requests across all replicas.
910

1011
![](../../images/use-a-load-balancer-1.svg)
1112

@@ -23,9 +24,36 @@ Make sure you configure your load balancer to:
2324

2425
* Load balance TCP traffic on ports 80 and 443
2526
* Not terminate HTTPS connections
26-
* Use the `/health` endpoint on each DTR replica, to check if
27-
the replica is healthy and if it should remain on the load balancing pool or
28-
not
27+
* Use the `/health` endpoint (note the lack of an `/api/v0/` in the path) on each
28+
DTR replica, to check if the replica is healthy and if it should remain on the
29+
load balancing pool or not
30+
31+
## Health check endpoints
32+
33+
The `/health` endpoint returns a JSON object for the replica being queried with
34+
`"Healthy"` as one of the keys. Any response other than a 200 HTTP status code
35+
and `"Healthy":true` means the replica is unsuitable for taking requests. If
36+
the API server is still up, the returned JSON object will have an `"Error"` key
37+
with more details. More specifically, these issues can be in any of these
38+
services:
39+
40+
* Storage container (registry)
41+
* Authorization (garant)
42+
* Metadata persistence (rethinkdb)
43+
* Content trust (notary)
44+
45+
Note that this endpoint is for checking the health of a *single* replica. To get
46+
the health of every replica in a cluster, querying each individual replica is
47+
the preferred way to do it in real time.
48+
49+
The `/api/v0/meta/cluster_status` endpoint returns a JSON object for the entire
50+
cluster *as observed* by the replica being queried. Health status for the
51+
replicas is available in the `"replica_health"` key. These statuses are taken
52+
from a cache which is updated by each replica individually.
53+
54+
In addition, this endpoint returns a dump of the rethink system tables
55+
which can be rather large (~45 KB) for a status endpoint.
56+
2957

3058
## Where to go next
3159

0 commit comments

Comments
 (0)