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
To deploy multiple instances of `cloudflared`, you can create and configure one tunnel and run it on multiple hosts. If your tunnel runs as a service, only one `cloudflared` instance is allowed per host.
11
+
12
+
You can run the same tunnel across various `cloudflared` processes for up to 100 connections (25 replicas) per tunnel. Cloudflare Load Balancers and DNS records can still point to the tunnel and its UUID. Traffic will be sent to all `cloudflared` processes associated with the tunnel.
13
+
14
+
:::tip[Deploy replicas in Kubernetes]
15
+
For information about running `cloudflared` in a Kubernetes deployment, refer to the [Kubernetes guide](/cloudflare-one/connections/connect-networks/deployment-guides/kubernetes/).
16
+
:::
17
+
18
+
## Remotely-managed tunnels
19
+
20
+
1. To create a remotely-managed tunnel, follow the [dashboard setup guide](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).
21
+
2. On the **Tunnels** page, select your newly created tunnel.
22
+
3. In the side panel, scroll down to **Connectors** to view the `cloudflared` instances for that tunnel.
23
+
3. Select **Edit**.
24
+
4. Select the operating system of the host where you want to deploy a replica.
25
+
5. Copy the installation command and run it on the host.
26
+
27
+
The new replica will appear on the **Connectors** list for the tunnel. All replicas will serve the same routes and use the same configuration parameters.
28
+
29
+
## Locally-managed tunnels
30
+
31
+
1. To create a locally-managed tunnel, complete Steps 1 through 5 in the [CLI setup guide](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/create-local-tunnel/).
32
+
33
+
2. Run your newly created tunnel.
34
+
35
+
```sh
36
+
cloudflared tunnel run <NAME>
37
+
```
38
+
39
+
This will start a `cloudflared` instance and generate a unique `connector_id`.
40
+
41
+
3. In a separate window or on another host, run the same command again:
42
+
43
+
```sh
44
+
cloudflared tunnel run <NAME>
45
+
```
46
+
47
+
This will initialize another `cloudflared` instance and generate another `connector_id`.
48
+
49
+
4. Run `tunnel info` to show each `cloudflared` instance running your tunnel:
50
+
51
+
```sh
52
+
cloudflared tunnel info <NAME>
53
+
```
54
+
55
+
This will output your tunnel UUID as well as two Connector IDs, one for each `cloudflared` process running your tunnel. With this command, you can also see that your tunnel is now being served by eight connections.
Copy file name to clipboardExpand all lines: src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/index.mdx
+57-59Lines changed: 57 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,81 +11,79 @@ Our lightweight and open-source connector, [`cloudflared`](https://github.com/cl
11
11
12
12
## `cloudflared` replicas
13
13
14
-
Cloudflare Tunnel also allows users to deploy additional instances of our connector, `cloudflared`, for availability and failover scenarios. We refer to these unique instances as replicas. Each replica establishes four new connections which serve as additional points of ingress to your origin, should you need them. Each of the replicas will point to the same tunnel. This ensures that your network remains up in the event a single host running `cloudflared` goes down.
14
+
Cloudflare Tunnel allows users to deploy additional instances of our connector, `cloudflared`, for availability and failover scenarios. We refer to these unique instances as replicas. Each replica establishes four new connections which serve as additional points of ingress to your origin, should you need them. Each of the replicas will point to the same tunnel. This ensures that your network remains up in the event a single host running `cloudflared` goes down.
15
+
16
+
```mermaid
17
+
graph LR
18
+
C((Cloudflare))
19
+
subgraph E[Private network]
20
+
cf1["cloudflared <br> (Tunnel-1 replica)"]
21
+
cf2["cloudflared <br> (Tunnel-1 replica)"]
22
+
S1[Application]
23
+
cf1-->S1
24
+
cf2-->S1
25
+
end
26
+
C -- "Connections x 4 <br>"--> cf1
27
+
C --> cf1
28
+
C --> cf1
29
+
C --> cf1
30
+
C -- Connections x 4--> cf2
31
+
C --> cf2
32
+
C --> cf2
33
+
C --> cf2
34
+
```
15
35
16
36
By design, replicas do not offer any level of traffic steering (random, hash, or round-robin). Instead, when a request arrives to Cloudflare, it will be forwarded to the replica that is geographically closest. If that distance calculation is unsuccessful or the connection fails, we will retry others, but there is no guarantee about which connection is chosen.
17
37
18
38
### When to use `cloudflared` replicas
19
39
20
40
- To provide additional points of availability for a single tunnel.
21
41
- To allocate failover nodes within your network.
22
-
- To update the configuration of a tunnel without downtime.
42
+
- To update the configuration of a tunnel [without downtime](/cloudflare-one/connections/connect-networks/downloads/update-cloudflared/#update-with-multiple-cloudflared-instances).
23
43
24
-
### Deploy `cloudflared` replicas
25
-
26
-
To deploy multiple instances of `cloudflared`, you can create and configure one tunnel and run it on multiple hosts. If your tunnel runs as a service, only one `cloudflared` instance is allowed per host.
1. To create a remotely-managed tunnel, follow the [dashboard setup guide](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).
31
-
2. On the **Tunnels** page, select your newly created tunnel. The **Connectors** section shows all of the `cloudflared` instances for that tunnel.
32
-
3. Select **Configure**.
33
-
4. Select the operating system of the host where you want to deploy a replica.
34
-
5. Copy the installation command and run it on the host.
35
-
36
-
The new replica will appear on the **Connectors** list for the tunnel.
37
-
38
-
</Details>
39
-
40
-
<Detailsheader="Locally-managed tunnels">
41
-
42
-
1. To create a locally-managed tunnel, complete Steps 1 through 5 in the [CLI setup guide](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/create-local-tunnel/).
43
-
44
-
2. Run your newly created tunnel.
45
-
46
-
```sh
47
-
cloudflared tunnel run <NAME>
48
-
```
49
-
50
-
This will start a `cloudflared` instance and generate a unique `connector_id`.
51
-
52
-
3. In a separate window or on another host, run the same command again:
53
-
54
-
```sh
55
-
cloudflared tunnel run <NAME>
56
-
```
57
-
58
-
This will initialize another `cloudflared` instance and generate another `connector_id`.
59
-
60
-
4. Run `tunnel info` to show each `cloudflared` instance running your tunnel:
61
-
62
-
```sh
63
-
cloudflared tunnel info <NAME>
64
-
```
65
-
66
-
This will output your tunnel UUID as well as two Connector IDs, one for each `cloudflared` process running your tunnel. With this command, you can also see that your tunnel is now being served by eight connections.
67
-
68
-
</Details>
69
-
70
-
You can run the same tunnel across various `cloudflared` processes for up to 100 connections (25 replicas) per tunnel. Cloudflare Load Balancers and DNS records can still point to the tunnel and its UUID. Traffic will be sent to all `cloudflared` processes associated with the tunnel.
71
-
72
-
:::note[Deploy replicas in Kubernetes]
73
-
For information about running `cloudflared` in a Kubernetes deployment, refer to the [Kubernetes guide](/cloudflare-one/connections/connect-networks/deployment-guides/kubernetes/).
74
-
:::
44
+
For setup instructions, refer to [Deploy cloudflared replicas](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/deploy-replicas/).
75
45
76
46
## Cloudflare Load Balancers
77
47
78
-
[Cloudflare Load Balancing](/load-balancing/) allows users to proactively steer traffic away from unhealthy origins (or other <GlossaryTooltipterm="endpoint"link="/glossary/?term=endpoint">endpoints</GlossaryTooltip>) and intelligently distribute the traffic load based on a multitude of steering algorithms. This process ensures that errors are not served to end users and empowers businesses to tightly couple overall business objectives to their traffic behavior.
79
-
80
-
In this model, more than one tunnel is required with identical configurations. The DNS record (`UUID.cfargotunnel.com`) for each Cloudflare Tunnel can be used at the origin within the load balancer. You can then define traffic steering policies to determine how traffic should be routed to each tunnel.
48
+
[Cloudflare Load Balancing](/load-balancing/) proactively steers traffic away from unhealthy origins and intelligently distributes the traffic load based on your choice of [steering algorithms](/load-balancing/understand-basics/traffic-steering/). Unlike [`cloudflared` replicas](#cloudflared-replicas) which all use the same tunnel, a typical load balancer setup requires creating multiple tunnels. Most customers will create one tunnel per data center and one load balancer pool per tunnel.
49
+
50
+
```mermaid
51
+
graph LR
52
+
accTitle: Load balancing traffic to applications behind Cloudflare Tunnel
53
+
54
+
A[Internet] --> C{Cloudflare <br> Load Balancer}
55
+
B[WARP clients] --> C
56
+
M[Magic WAN] --> C
57
+
C -- Tunnel 1 --> cf1
58
+
C -- Tunnel 2 --> cf2
59
+
subgraph F[Data center 2]
60
+
cf2[cloudflared <br> server]
61
+
S3[App server]
62
+
S4[App server]
63
+
cf2-->S3
64
+
cf2-->S4
65
+
end
66
+
subgraph E[Data center 1]
67
+
cf1[cloudflared <br> server]
68
+
S1[App server]
69
+
S2[App server]
70
+
cf1-->S1
71
+
cf1-->S2
72
+
end
73
+
```
81
74
82
75
### When to use load balancers
83
76
84
77
- To intelligently steer traffic based on latency, geolocation, or other signals.
85
78
- To implement failover logic if a tunnel reaches an inactive state.
86
-
- To get alerted when a tunnel reaches an inactive state.
79
+
- To get a [health alert](/notifications/notification-available/#load-balancing) when a tunnel reaches an inactive state.
87
80
- To distribute traffic more evenly across your Cloudflare Tunnel-accessible origins or endpoints.
88
81
89
-
### Deploy a load balancer
82
+
For setup instructions, refer to [Public load balancers](/cloudflare-one/connections/connect-networks/routing-to-tunnel/public-load-balancers/) or [Private Network Load Balancing](/load-balancing/private-network/) depending on your [use case](#types-of-load-balancers).
83
+
84
+
### Types of load balancers
85
+
86
+
There are two types of load balancers that you can use with Cloudflare Tunnel endpoints:
90
87
91
-
Refer to the [Load Balancer page](/cloudflare-one/connections/connect-networks/routing-to-tunnel/lb/) for more information.
88
+
-[Public load balancers](/cloudflare-one/connections/connect-networks/routing-to-tunnel/public-load-balancers/) steer traffic from the Internet to applications published on a Cloudflare domain. Use this method if your service is served by Cloudflare Tunnel via a [published application route](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/#2a-publish-an-application).
89
+
-[Private load balancers](/load-balancing/private-network/) steer traffic from WARP clients, Magic WAN, and other <GlossaryTooltipterm="on-ramp">on-ramps</GlossaryTooltip> to an internal IP on your private network. Use this method if your service is connected to Cloudflare Tunnel via a [CIDR route](/cloudflare-one/connections/connect-networks/private-net/cloudflared/connect-cidr/).
0 commit comments