@@ -4,8 +4,9 @@ description: Learn how to configure a load balancer to balance user requests acr
4
4
keywords : docker, dtr, load balancer
5
5
---
6
6
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.
9
10
10
11
![ ] ( ../../images/use-a-load-balancer-1.svg )
11
12
@@ -23,9 +24,36 @@ Make sure you configure your load balancer to:
23
24
24
25
* Load balance TCP traffic on ports 80 and 443
25
26
* 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
+
29
57
30
58
## Where to go next
31
59
0 commit comments