docs/pages/zero-trust-access/deploy-a-cluster/deployments/aws-gslb-proxy-peering-ha-deployment.mdx
This deployment architecture describes how to deploy a Teleport cluster with Proxy Service instances spread across multiple AWS regions.
<Admonition type="note"> The Teleport Auth Service instances are deployed in a single region with this architecture. For details on the supported architecture for multi-region Auth Service instances, refer to the [Multi-region Blueprint](./multi-region-blueprint.mdx) </Admonition>It features two important design decisions:
This deployment architecture isn't recommended for use cases where your users or resources are clustered in a single region, or for Managed Service Providers needing to provide separate clusters to customers.
This architecture is best suited for globally distributed resources and end-users that prefer a single point of entry while also ensuring minimal latency when accessing connected resources.
This guide assumes that your infrastructure is not hosted in AWS GovCloud or in an air-gapped AWS environment (EKS Anywhere). If it is, contact the Teleport team for assistance planning your deployment.
AWS NLBs are required for this highly available deployment architecture. The NLB forwards traffic from users and services to an available Teleport Proxy Service instance. This must not terminate TLS, and must transparently forward the TCP traffic it receives. In other words, this must be a Layer 4 load balancer, not a Layer 7 (e.g., HTTP) load balancer.
<Admonition type="warning" title="Note"
Cross-zone load balancing is required for the Auth Service and Proxy Service NLB configurations to route traffic across multiple zones. Doing this improves resiliency against localized AWS zone outages. </Admonition>
Configure the load balancer to forward traffic from the following ports on the load balancer to the corresponding port on an available Teleport instance.
<TabItem label="NLB Proxy ports">| Port | Description |
|---|---|
443 | ALPN port for TLS Routing, HTTPS connections to authenticate tsh users into the cluster, and to serve Teleport's Web UI |
Configure the load balancer to forward traffic from the following ports on the load balancer to the corresponding port on an available Teleport instance.
<Admonition type="warning" title="Note"
Proxies must have network access to the Auth Service NLB. You can accomplish this using VPC Peering or Transit Gateways. </Admonition>
Internal NLB Auth Service ports
| Port | Description |
|---|---|
3025 | TLS port used by the Auth Service to serve its API to Proxies in a cluster |
High-availability Teleport deployments require a system to fetch TLS credentials from a certificate authority like Let's Encrypt, AWS Certificate Manager, Digicert, or a trusted internal authority. The system must then provision Teleport Proxy Service instances with these credentials and renew them periodically.
For high-availability deployments that use Let's Encrypt to supply TLS credentials to Teleport instances running behind a load balancer, you need to use the ACME DNS-01 challenge to demonstrate domain name ownership to Let's Encrypt. In this challenge, your TLS credential provisioning system creates a DNS TXT record with a value expected by Let's Encrypt.
Latency-based routing in a public hosted zone must be used to ensure traffic from Teleport resources are routed to the closest or lowest latency path Proxy NLB based on the region of the VPC the resource is connecting from.
To configure this behavior, create a CNAME record for each region where you have VPCs containing Teleport-connected resources. It is recommended to add a wildcard record for every region if you plan to register applications with Teleport.
The following CNAME record values need to be set:
example-region-1 located Teleport resource traffic should be routedExample Hosted Zone using AWS Route53 Latency Routing:
| Record name | Type | Value |
|---|---|---|
*.teleport.example.com | CNAME | AWS Route 53 nameservers |
| Record name | Type | Routing Policy | Region | Value |
|---|---|---|---|---|
teleport.example.com | CNAME | Latency | us-west-1 | elb.us-west-1.amazonaws.com |
*.teleport.example.com | CNAME | Latency | us-west-1 | elb.us-west-1.amazonaws.com |
teleport.example.com | CNAME | Latency | eu-central-1 | elb.eu_central-1.amazonaws.com |
*.teleport.example.com | CNAME | Latency | eu-central-1 | elb.eu_central-1.amazonaws.com |
If you are using Let's Encrypt to provide TLS credentials to your Teleport instances, the TLS credential system we mentioned earlier needs permissions to manage Route53 DNS records in order to satisfy Let's Encrypt's DNS-01 challenge.
</Admonition>To facilitate latency-based routing, resource agents must be configured to point proxy_server to
the CNAME configured in Route53, not the specific proxy NLB address.
For example:
version: v3
teleport:
nodename: ssh-node
...
proxy_server: teleport.example.com:443
...
ssh_service:
enabled: true
...
Review the configuration reference page for additional settings.
In this deployment architecture, Proxy Peering is used to restrict the number of connections made from resources to proxies in the Teleport Cluster.
The Teleport Auth Service must be configured to use the proxy_peering tunnel strategy as shown in the example below:
auth_service:
...
tunnel_strategy:
type: proxy_peering
agent_connection_count: 2
Reference the Auth Service configuration reference page for additional settings.
Proxies must advertise a peer address for proxy peers to establish connections to each other. The ports exposed on the Teleport Proxy Instances depends on whether you route Proxy Peering traffic over the public internet:
<Tabs> <TabItem label="Public Proxy Peering ports">| Port | Description |
|---|---|
443 | ALPN port for TLS Routing, HTTPS connections to authenticate tsh users into the cluster, and to serve Teleport's Web UI |
3021 | Proxy Peering gRPC Stream |
| Port | Description |
|---|---|
443 | ALPN port for TLS Routing, HTTPS connections to authenticate tsh users into the cluster, and to serve Teleport's Web UI |
Set peer_public_addr to the specific name of that proxy. This is the recommended
method for lowest latency and most reliable connection.
version: v3
teleport:
...
proxy_service:
...
peer_public_addr: teleport-proxy-eu-west-1-host1.example.com:3021
...
<Admonition type="warning" title="Note"
agent_connection_count on the Auth service should be set to a value >=2 to decrease
the likelihood of agents being unavailable.
</Admonition>
Reference the Proxy Service configuration reference page for additional settings.