You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [public load balancer](/load-balancing/load-balancers/) allows you to distribute traffic across the servers that are running your [published applications](/cloudflare-one/connections/connect-networks/routing-to-tunnel/).
11
11
12
-
When you add a [published application route](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/#2a-publish-an-application) to your Cloudflare Tunnel, Cloudflare generates a subdomain of `cfargotunnel.com` with the UUID of the created tunnel. You can add the application to a load balancer pool by using `<UUID>.cfargotunnel.com` as the [endpoint address](/load-balancing/understand-basics/load-balancing-components/#endpoints) and specifying the application hostname (`app.example.com`) in the [host header](/load-balancing/additional-options/override-http-host-headers/). Load Balancer does not support directly adding `app.example.com` as an endpoint if the service is behind Cloudflare Tunnel.
12
+
When you add a [published application route](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/#2a-publish-an-application) to your Cloudflare Tunnel, Cloudflare generates a subdomain of `cfargotunnel.com` with the UUID of the created tunnel. You can add the application to a load balancer pool by using `<UUID>.cfargotunnel.com` as the [endpoint address](/load-balancing/understand-basics/load-balancing-components/#endpoints) and specifying the application hostname (`app.example.com`) in the [endpoint host header](/load-balancing/additional-options/override-http-host-headers/). Load Balancer does not support directly adding `app.example.com` as an endpoint if the service is behind Cloudflare Tunnel.
13
13
14
14
## Create a public load balancer
15
15
@@ -33,7 +33,7 @@ To create a load balancer for Cloudflare Tunnel published applications:
33
33
8. To add a tunnel endpoint to the pool, configure the following fields:
34
34
-**Endpoint Name**: Name of the server that is running the application
35
35
-**Endpoint Address**: `<UUID>.cfargotunnel.com`, where `<UUID>` is replaced by your Tunnel ID. You can find the **Tunnel ID** in [Zero Trust](https://one.dash.cloudflare.com) under **Networks** > **Tunnels**.
36
-
-**Header value**: Hostname of your published application route (such as `app.example.com`). To find the hostname value, open your tunnel configuration and go to the **Published application routes** tab.
36
+
-**Header value**: Hostname of your published application route (such as `app.example.com`). To find the hostname value, open your Cloudflare Tunnel configuration and go to the **Published application routes** tab.
37
37
-**Weight**: Assign a [weight](/load-balancing/understand-basics/traffic-steering/origin-level-steering/#weights) to the endpoint. If you only have one endpoint, enter `1`.
38
38
:::note
39
39
A single origin pool cannot have the same Tunnel UUID referenced twice.
@@ -61,7 +61,7 @@ The application will default to the Cloudflare settings for the load balancer ho
61
61
62
62
## Common architectures
63
63
64
-
Review common load balancing configurations for Cloudflare Tunnel published applications.
64
+
Review common load balancing configurations for published applications behind Cloudflare Tunnel.
65
65
66
66
### One tunnel per region
67
67
@@ -102,9 +102,9 @@ As shown in the diagram, a typical setup includes:
102
102
- A dedicated Cloudflare Tunnel per data center.
103
103
- One load balancer pool per tunnel.
104
104
- One load balancer endpoint per pool, where the host header is set to the `cloudflared` published application hostname.
105
-
- At least two `cloudflared`[replicas](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/#cloudflared-replicas) per tunnel in their respective data centers, in case a `cloudflared` host machine goes down.
105
+
- At least two `cloudflared`[replicas](#session-affinity-and-replicas) per tunnel in their respective data centers, in case a `cloudflared` host machine goes down.
106
106
107
-
Users will access the application using the load balancer hostname (`app.example.com`). Note that this setup is only valid for [Active-Passive failover](/load-balancing/load-balancers/common-configurations/#active---passive-failover), since each pool only supports one endpoint per tunnel.
107
+
Users can now connect to the application using the load balancer hostname (`app.example.com`). Note that this configuration is only valid for [Active-Passive failover](/load-balancing/load-balancers/common-configurations/#active---passive-failover), since each pool only supports one endpoint per tunnel.
108
108
109
109
### Multiple apps per tunnel
110
110
@@ -141,44 +141,40 @@ graph LR
141
141
end
142
142
```
143
143
144
-
This setup includes:
144
+
This load balancing setup includes:
145
145
146
146
- Two Cloudflare Tunnels with identical routes to both applications.
147
147
- One load balancer pool per application.
148
148
- Each load balancer pool has an endpoint per tunnel.
149
149
- A [DNS record](#dns-records) for each application that points to the load balancer hostname.
150
150
151
-
Users can now access all applications through the load balancer. Since there are multiple tunnel endpoints per pool, this configuration supports [Active-Active Failover](/load-balancing/load-balancers/common-configurations/#active---active-failover). Active-Active uses all available endpoints in the pool to process requests simultaneously, providing better performance and scalability by load-balancing traffic across them.
151
+
Users can now access all applications through the load balancer. Since there are multiple tunnel endpoints per pool, this configuration supports [Active-Active Failover](/load-balancing/load-balancers/common-configurations/#active---active-failover). Active-Active uses all available endpoints in the pool to process requests simultaneously, providing better performance and scalability by loadbalancing traffic across them.
152
152
153
153
#### DNS records
154
154
155
-
When you configure a published application route via the dashboard, Cloudflare will automatically generate a `CNAME` DNS record that points the application hostname (`app1.example.com`) to `<UUID>.cfargotunnel.com`. You can [edit these DNS records](/dns/manage-dns-records/how-to/create-dns-records/#edit-dns-records) so that they point to the load balancer hostname instead.
155
+
When you configure a published application route via the dashboard, Cloudflare will automatically generate a `CNAME` DNS record that points the application hostname (`app1.example.com`) to the tunnel subdomain (`<UUID>.cfargotunnel.com`). You can [edit these DNS records](/dns/manage-dns-records/how-to/create-dns-records/#edit-dns-records) so that they point to the load balancer hostname instead.
156
156
157
-
<Detailsheader="Example"open={true}>
158
-
Auto-generated DNS records after setting up [Multiple apps per tunnel](#multiple-apps-per-tunnel):
157
+
:::note
158
+
Tunnel routes configured via the API or CLI require [manually creating DNS records](/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/).
159
+
:::
159
160
161
+
Here is an example of what your DNS records will look like before and after setting up [Multiple apps per tunnel](#multiple-apps-per-tunnel):
162
+
163
+
**Before**:
160
164
| Type | Name | Content |
161
165
| ---- | ---- | ------- |
162
-
| LB |`lb.example.com`| n/a|
163
166
| CNAME | app1 |`<UUID_1>.cfargotunnel.com`|
164
167
| CNAME | app2 |`<UUID_1>.cfargotunnel.com`|
165
168
| CNAME | app1 |`<UUID_2>.cfargotunnel.com`|
166
169
| CNAME | app2 |`<UUID_2>.cfargotunnel.com`|
167
170
168
-
Updated DNS records:
169
-
171
+
**After**:
170
172
| Type | Name | Content |
171
173
| ---- | ---- | ------- |
172
174
| LB |`lb.example.com`| n/a |
173
175
| CNAME | app1 |`lb.example.com`|
174
176
| CNAME | app2 |`lb.example.com`|
175
177
176
-
</Details>
177
-
178
-
:::note
179
-
Tunnel routes configured via the API or CLI require [manually creating the DNS record](/cloudflare-one/connections/connect-networks/routing-to-tunnel/dns/).
0 commit comments