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
Copy file name to clipboardExpand all lines: src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/index.mdx
+85-6Lines changed: 85 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,26 @@ Our lightweight and open-source connector, [`cloudflared`](https://github.com/cl
13
13
14
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.
15
15
16
+
```mermaid
17
+
graph LR
18
+
C{Cloudflare}
19
+
subgraph E[Private network]
20
+
cf1["cloudflared replica <br> (Tunnel-1)"]
21
+
cf2["cloudflared replica <br> (Tunnel-1)"]
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
+
```
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
@@ -75,9 +95,38 @@ For information about running `cloudflared` in a Kubernetes deployment, refer to
75
95
76
96
## Cloudflare Load Balancers
77
97
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.
98
+
[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/). Load balancers can be configured for traffic originating from both the public Internet and from within a private network.
99
+
100
+
A load balancer setup requires more than one tunnel with identical configurations. Most customers will create one tunnel per data center and one load balancer pool per tunnel.
101
+
102
+
```mermaid
103
+
graph LR
104
+
accTitle: Load balancing traffic to applications behind Cloudflare Tunnel
105
+
106
+
A[Internet] --> C{Cloudflare <br> Load Balancer}
107
+
B[WARP clients] --> C
108
+
M[Magic WAN] --> C
109
+
C -- Tunnel 1 --> cf1
110
+
C -- Tunnel 2 --> cf2
111
+
subgraph F[Data center 2]
112
+
cf2[cloudflared <br> server]
113
+
subgraph pool2[Pool 2]
114
+
S3[App server]
115
+
S4[App server]
116
+
end
117
+
cf2-->S3
118
+
cf2-->S4
119
+
end
120
+
subgraph E[Data center 1]
121
+
cf1[cloudflared <br> server]
122
+
subgraph pool1[Pool 1]
123
+
S1[App server]
124
+
S2[App server]
125
+
end
126
+
cf1-->S1
127
+
cf1-->S2
128
+
end
129
+
```
81
130
82
131
### When to use load balancers
83
132
@@ -86,6 +135,36 @@ In this model, more than one tunnel is required with identical configurations. T
86
135
- To get alerted when a tunnel reaches an inactive state.
87
136
- To distribute traffic more evenly across your Cloudflare Tunnel-accessible origins or endpoints.
88
137
89
-
### Deploy a load balancer
90
-
91
-
Refer to the [Load Balancer page](/cloudflare-one/connections/connect-networks/routing-to-tunnel/lb/) for more information.
138
+
### Public load balancer
139
+
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.
140
+
141
+
142
+
143
+
### Private load balancer
144
+
145
+
If the server IPs overlap, then use a different virtual network in each tunnel so that Load Balancer can route requests to the correct data center and server.
0 commit comments