From 69fed5226d47acb066a839ca52f10a95f7f74154 Mon Sep 17 00:00:00 2001 From: Joao Fernandes Date: Mon, 6 Feb 2017 15:51:04 -0800 Subject: [PATCH] Add use a load balancer for DTR --- _data/toc.yaml | 2 + .../admin/configure/high-availability.md | 85 ------------------- .../admin/configure/use-a-load-balancer.md | 33 +++++++ 3 files changed, 35 insertions(+), 85 deletions(-) delete mode 100644 datacenter/dtr/2.2/guides/admin/configure/high-availability.md create mode 100644 datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md diff --git a/_data/toc.yaml b/_data/toc.yaml index 89df7cb94c..a189b2aa92 100644 --- a/_data/toc.yaml +++ b/_data/toc.yaml @@ -1053,6 +1053,8 @@ toc: title: NFS - path: /datacenter/dtr/2.2/guides/admin/configure/set-up-high-availability/ title: Set up high availability + - path: /datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer/ + title: Use a load balancer - path: /datacenter/dtr/2.2/guides/admin/configure/set-up-vulnerability-scans/ title: Set up vulnerability scans - path: /datacenter/dtr/2.2/guides/admin/configure/deploy-a-cache/ diff --git a/datacenter/dtr/2.2/guides/admin/configure/high-availability.md b/datacenter/dtr/2.2/guides/admin/configure/high-availability.md deleted file mode 100644 index 9849864326..0000000000 --- a/datacenter/dtr/2.2/guides/admin/configure/high-availability.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -description: Learn how to set up Docker Trusted Registry for high availability. -keywords: docker, registry, high-availability, backup, recovery -title: Set up DTR with high availability ---- - - - -Docker Trusted Registry (DTR) is designed for high availability. - -When you first install DTR, you create a cluster with a single DTR replica. -Replicas are single instances of DTR that can be joined together to form a -cluster. -When joining new replicas to the cluster, you'll be creating new DTR instances -that are running the same set of services. Any change to the state of an -instance is replicated across all other instances. - -![](../images/high-availability-1.png) - -Having a DTR cluster with multiple replicas, allows you to: - -* Load-balance user requests across the DTR replicas, -* Keep the DTR cluster working if a replica fails. - -To make a DTR installation tolerant to failures, add additional replicas to -the DTR cluster. - -| DTR replicas | Failures tolerated | -|:------------:|:------------------:| -| 1 | 0 | -| 3 | 1 | -| 5 | 2 | -| 7 | 3 | - - -When sizing your DTR installation for high-availability, -follow these rules of thumb: - -* Don't create a DTR cluster with just two replicas. Your cluster -won't tolerate any failures, and it's possible that you experience performance -degradation. -* When a replica fails, the number of failures tolerated by your cluster -decreases. Don't leave that replica offline for long. -* Adding too many replicas to the cluster might also lead to performance -degradation, as data needs to be replicated across all replicas. - -## Size your cluster - -When installing DTR for production, you should have dedicated nodes for running: - -* Docker Universal Control Plane (UCP) controller nodes, -* DTR replicas, -* Your own applications. - -Having dedicated nodes ensures all applications will remain performant since -they have dedicated resources for them. -It also makes it easier to implement backup policies and disaster recovery -plans for UCP and DTR. - -To have high-availability on UCP and DTR, you need a minimum of: - -* 3 dedicated nodes to install UCP with high availability, -* 3 dedicated nodes to install DTR with high availability, -* As many nodes as you want for running your containers and applications. - - -![](../images/high-availability-2.png) - -## Load balancing - -DTR does not provide a load balancing service. You can use an on-premises -or cloud-based load balancer to balance requests across multiple DTR replicas. - -Make sure you configure your load balancer to: - -* Load-balance TCP traffic on ports 80 and 443, -* Not terminate HTTPS connections, -* Use the `/health` endpoint on each DTR replica, to check if -the replica is healthy and if it should remain on the load balancing pool or -not. - -## Where to go next - -* [Backups and disaster recovery](backups-and-disaster-recovery.md) -* [DTR architecture](../architecture.md) diff --git a/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md b/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md new file mode 100644 index 0000000000..de9b29f30a --- /dev/null +++ b/datacenter/dtr/2.2/guides/admin/configure/use-a-load-balancer.md @@ -0,0 +1,33 @@ +--- +title: Use a load balancer +description: Learn how to configure a load balancer to balance user requests across multiple Docker Trusted Registry replicas. +keywords: docker, dtr, load balancer +--- + +Once you’ve joined multiple DTR replicas nodes for high-availability, you can +configure your own load balancer to balance user requests across all replicas. + +![](image) + + +This allows users to access DTR using a centralized domain name. If a replica +goes down, the load balancer can detect that and stop forwarding requests to +it, so that the failure goes unnoticed by users. + +## Load-balancing DTR + +DTR does not provide a load balancing service. You can use an on-premises +or cloud-based load balancer to balance requests across multiple DTR replicas. + +Make sure you configure your load balancer to: + +* Load-balance TCP traffic on ports 80 and 443 +* Not terminate HTTPS connections +* Use the `/health` endpoint on each DTR replica, to check if +the replica is healthy and if it should remain on the load balancing pool or +not + +## Where to go next + +* [Backups and disaster recovery](backups-and-disaster-recovery.md) +* [DTR architecture](../architecture.md)