Skip to content

Commit 15e794e

Browse files
committed
edit diagrams
1 parent 209f43d commit 15e794e

File tree

1 file changed

+112
-64
lines changed
  • src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability

1 file changed

+112
-64
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/index.mdx

Lines changed: 112 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -39,59 +39,7 @@ By design, replicas do not offer any level of traffic steering (random, hash, or
3939

4040
- To provide additional points of availability for a single tunnel.
4141
- To allocate failover nodes within your network.
42-
- To update the configuration of a tunnel without downtime.
43-
44-
### Deploy `cloudflared` replicas
45-
46-
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.
47-
48-
<Details header="Remotely-managed tunnels" open = {true} >
49-
50-
1. To create a remotely-managed tunnel, follow the [dashboard setup guide](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).
51-
2. On the **Tunnels** page, select your newly created tunnel. The **Connectors** section shows all of the `cloudflared` instances for that tunnel.
52-
3. Select **Configure**.
53-
4. Select the operating system of the host where you want to deploy a replica.
54-
5. Copy the installation command and run it on the host.
55-
56-
The new replica will appear on the **Connectors** list for the tunnel.
57-
58-
</Details>
59-
60-
<Details header="Locally-managed tunnels">
61-
62-
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/).
63-
64-
2. Run your newly created tunnel.
65-
66-
```sh
67-
cloudflared tunnel run <NAME>
68-
```
69-
70-
This will start a `cloudflared` instance and generate a unique `connector_id`.
71-
72-
3. In a separate window or on another host, run the same command again:
73-
74-
```sh
75-
cloudflared tunnel run <NAME>
76-
```
77-
78-
This will initialize another `cloudflared` instance and generate another `connector_id`.
79-
80-
4. Run `tunnel info` to show each `cloudflared` instance running your tunnel:
81-
82-
```sh
83-
cloudflared tunnel info <NAME>
84-
```
85-
86-
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.
87-
88-
</Details>
89-
90-
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.
91-
92-
:::note[Deploy replicas in Kubernetes]
93-
For information about running `cloudflared` in a Kubernetes deployment, refer to the [Kubernetes guide](/cloudflare-one/connections/connect-networks/deployment-guides/kubernetes/).
94-
:::
42+
- To update the configuration of a tunnel [without downtime](/cloudflare-one/connections/connect-networks/downloads/update-cloudflared/#update-with-multiple-cloudflared-instances).
9543

9644
## Cloudflare Load Balancers
9745

@@ -110,22 +58,19 @@ graph LR
11058
C -- Tunnel 2 --> cf2
11159
subgraph F[Data center 2]
11260
cf2[cloudflared <br> server]
113-
subgraph pool2[Pool 2]
114-
S3[App server]
115-
S4[App server]
116-
end
61+
S3[App server]
62+
S4[App server]
11763
cf2-->S3
11864
cf2-->S4
11965
end
12066
subgraph E[Data center 1]
12167
cf1[cloudflared <br> server]
122-
subgraph pool1[Pool 1]
123-
S1[App server]
124-
S2[App server]
125-
end
68+
S1[App server]
69+
S2[App server]
12670
cf1-->S1
12771
cf1-->S2
12872
end
73+
12974
```
13075

13176
### When to use load balancers
@@ -135,12 +80,112 @@ graph LR
13580
- To get alerted when a tunnel reaches an inactive state.
13681
- To distribute traffic more evenly across your Cloudflare Tunnel-accessible origins or endpoints.
13782

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.
14083

84+
## Public load balancer
85+
86+
Public load balancers steer traffic from the public Internet to your [published applications](/cloudflare-one/connections/connect-networks/routing-to-tunnel/).
14187

14288

143-
### Private load balancer
89+
e.g.
90+
I have a web application (HTTPS) that lives in my private network and I want to securely connect it to Cloudflare's network so that my users can use their browser to access the web application from anywhere in the world
91+
92+
The DNS record (`UUID.cfargotunnel.com`) for each Cloudflare Tunnel can be used at the origin within the load balancer.
93+
94+
### Scenario 1: One tunnel per app server
95+
```mermaid
96+
graph LR
97+
subgraph LB["Public load balancer <br> app.example.com "]
98+
subgraph P1[Pool 1]
99+
E1(["**Endpoint:** &lt;UUID_1&gt;.cfargotunnel.com<br> **Host header**: app1.example.com"])
100+
end
101+
subgraph P2[Pool 2]
102+
E2(["**Endpoint:** &lt;UUID_2&gt;.cfargotunnel.com<br> **Host header**: app2.example.com"])
103+
end
104+
end
105+
R@{ shape: text, label: "app.example.com" }
106+
R--> LB
107+
P1 -- Tunnel 1 --> cf1
108+
P2 -- Tunnel 2 --> cf2
109+
subgraph D2[Private network]
110+
cf1[cloudflared <br> **Route:** app1.example.com]
111+
S1(["App1<br> 10.0.0.1:80"])
112+
cf1-->S1
113+
cf2[cloudflared <br> **Route:** app2.example.com]
114+
S3(["App2 <br> 10.0.0.2:80"])
115+
cf2-->S3
116+
end
117+
```
118+
119+
Only valid for active-standby setups, since each pool has only one endpoint.
120+
121+
122+
### Scenario 2: Two tunnels, each tunnel connects to both apps
123+
124+
```mermaid
125+
graph LR
126+
subgraph LB["Public load balancer <br> app.example.com "]
127+
subgraph P1[Pool 1]
128+
E1(["**Endpoint:** &lt;UUID_1&gt;.cfargotunnel.com<br> **Host header**: app1.example.com"])
129+
E2(["**Endpoint:** &lt;UUID_2&gt;.cfargotunnel.com<br> **Host header**: app2.example.com"])
130+
end
131+
subgraph P2[Pool 2]
132+
E3(["**Endpoint:** &lt;UUID_1&gt;.cfargotunnel.com<br> **Host header**: app1.example.com"])
133+
E4(["**Endpoint:** &lt;UUID_2&gt;.cfargotunnel.com<br> **Host header**: app2.example.com"])
134+
end
135+
end
136+
R@{ shape: text, label: "app.example.com" }
137+
R--> LB
138+
E1 -- Tunnel 1 -->cf1
139+
E3 -- Tunnel 1 --> cf1
140+
E2 -- Tunnel 2 --> cf2
141+
E4 -- Tunnel 2 --> cf2
142+
143+
subgraph N[Private network]
144+
cf2[cloudflared <br> **Route:** app1.example.com <br> **Route:** app2.example.com]
145+
S3(["App1 <br> 10.0.0.1:80"])
146+
cf2-->S3
147+
cf2-->S1
148+
cf1[cloudflared <br> **Route:** app1.example.com <br> **Route:** app2.example.com]
149+
S1(["App2 <br> 10.0.0.2:80"])
150+
cf1-->S1
151+
cf1-->S3
152+
end
153+
```
154+
155+
good for an [Active-active](/load-balancing/load-balancers/common-configurations/#active---active-failover) setup which distributes traffic to endpoints in the same pool
156+
157+
### Scenario 3: One tunnel for both apps
158+
159+
```mermaid
160+
graph LR
161+
subgraph LB["Public load balancer <br> app.example.com "]
162+
subgraph P1[Pool 1]
163+
E1(["**Endpoint:** &lt;UUID_1&gt;.cfargotunnel.com<br> **Host header**: app1.example.com"])
164+
end
165+
subgraph P2[Pool 2]
166+
E2(["**Endpoint:** &lt;UUID_1&gt;.cfargotunnel.com<br> **Host header**: app2.example.com"])
167+
end
168+
end
169+
R@{ shape: text, label: "app.example.com" }
170+
R--> LB
171+
P1 -- Tunnel 1 --> cf1
172+
P2 -- Tunnel 1 --> cf1
173+
subgraph D2[Private network]
174+
cf1@{ shape: processes, label: "cloudflared <br> **Route:** app1.example.com <br> **Route:** app2.example.com" }
175+
S3(["App1 <br> 10.0.0.1:80"])
176+
S1(["App2 <br> 10.0.0.2:80"])
177+
cf1-->S1
178+
cf1-->S3
179+
end
180+
```
181+
182+
Only valid for active-standby setups, since each pool has only one endpoint.
183+
184+
Note: A single origin pool in LB can't have the same Tunnel GUID referenced twice
185+
186+
Deploy replicas for redundancy
187+
188+
## Private load balancer
144189

145190
You can use Cloudflare Private Network Load Balancing to distribute traffic across private endpoints connected via Cloudflare Tunnel. Common use cases include:
146191

@@ -176,4 +221,7 @@ graph LR
176221
cf1-->S1
177222
cf1-->S2
178223
end
224+
225+
style E stroke-width:2px,stroke-dasharray: 5 5
226+
style F stroke-width:2px,stroke-dasharray: 5 5
179227
```

0 commit comments

Comments
 (0)