Skip to content

Commit d4a0ecb

Browse files
Bring IPs allocation and conneciton forwarding into about.mdx
1 parent 0f3a531 commit d4a0ecb

File tree

3 files changed

+132
-3
lines changed

3 files changed

+132
-3
lines changed

src/content/docs/smart-shield/concepts/connection-reuse.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ Smart Shield leverages Cloudflare's optimized infrastructure to package multiple
1111

1212
## About connection reuse
1313

14-
<Render file="connection-reuse" product="aegis" />
14+
<Render file="connection-reuse" product="aegis" />
15+
16+
## Egress IPs allocation
17+
18+
Connection reuse and connection coalescing are also considered when allocating your [Dedicated CDN Egress IPs](/smart-shield/configuration/dedicated-egress-ips/).

src/content/docs/smart-shield/configuration/dedicated-egress-ips/about.mdx

Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ head:
88
content: How Dedicated CDN Egress IPs work
99
---
1010

11+
import { Render } from "~/components";
12+
1113
When you use Cloudflare [as a reverse proxy](/fundamentals/concepts/how-cloudflare-works/#how-cloudflare-works-as-a-reverse-proxy), [Cloudflare's global network](https://www.cloudflare.com/network/) sits between client requests and your origin servers.
1214

1315
```mermaid
@@ -17,6 +19,8 @@ flowchart LR
1719
A[Client] <--> B((Cloudflare))<--> C[(Origin server)]
1820
```
1921

22+
## Egress IPs
23+
2024
Zooming in to what happens as a request routes through Cloudflare, you can consider two parts of the process: ingress and egress.
2125

2226
```mermaid
@@ -31,5 +35,126 @@ Ingress refers to the data center where the client request lands on, based on In
3135
Traditionally, Cloudflare maintains a very large pool of egress IPs that are used by all Cloudflare customers and are [publicly documented](https://www.cloudflare.com/ips/). With Dedicated CDN Egress IPs, Cloudflare connects to your origin using IPs that are reserved for you.
3236

3337
:::note
34-
Each dedicated egress pool can consist of either IPs from a [BYOIP prefix](/byoip/) or Cloudflare-leased IPs. A single dedicated egress pool cannot contain both BYOIPs and leased IPs.
38+
Each dedicated CDN egress IP pool can consist of either IPs from a [BYOIP prefix](/byoip/) or Cloudflare-leased IPs. A single dedicated CDN egress IP pool cannot contain both BYOIPs and leased IPs.
39+
:::
40+
41+
## IPs allocation
42+
43+
Dedicated CDN Egress IPs support both IPv4 and IPv6 addresses.
44+
45+
IPv6 address ranges are deployed globally, meaning your dedicated IPv6 addresses can be used for connections from Cloudflare to your origin servers across all Cloudflare data centers.
46+
47+
:::note[China exception]
48+
Dedicated CDN Egress IPs are currently **not** available in the [Cloudflare China Network](/china-network/).
3549
:::
50+
51+
For IPv4 addresses, you should work with your account team to choose the locations where each IP should be deployed. Ideally, your dedicated IPv4 addresses should be placed near your origin servers and adjusted to the amount of traffic expected for each region.
52+
53+
Refer to [connection forwarding](#connection-forwarding) to understand how requests are processed when reaching different Cloudflare data centers.
54+
55+
### Connections to your origin
56+
57+
<Render file="concurrent-connections-explainer" product="aegis" />
58+
59+
Dedicated CDN Egress IPs also benefit from [connection reuse and connection coalescing](/smart-shield/concepts/connection-reuse/).
60+
61+
GraphQL Analytics API allows you to get visibility over [IPs utilization](/smart-shield/configuration/dedicated-egress-ips/ips-utilization/).
62+
63+
### Regional services
64+
65+
If you are using [Regional Services](/data-localization/regional-services/), you should take this into consideration when allocating dedicated IPv4 addresses. Traffic will egress from the specified locations as long as you have Dedicated CDN Egress IPs provisioned in those locations.
66+
67+
## Connection forwarding
68+
69+
Since IPv6 address ranges are deployed globally, no forwarding is needed.
70+
71+
For IPv4 traffic, based on [IPs allocation](#ips-allocation), not all egress data centers will have access to an applicable dedicated CDN egress IP.
72+
73+
Dedicated CDN egress IPs do not forward to another location in response to traffic spikes. Instead, each IPv4 can be split across up to four locations, where some of these locations may have multiple data centers. IP capacity in each data center can also be adjusted in accordance with the amount of traffic that reaches each location.
74+
75+
After a request reaches Cloudflare on an ingress data center, and the cache service sends a request for the egress router to connect to your origin, the following scenarios are possible.
76+
77+
### Traffic can egress from the same server
78+
79+
If the server running the egress router has access to an applicable dedicated CDN egress IP, traffic egresses from that server.
80+
81+
```mermaid
82+
flowchart LR
83+
accTitle: Dedicated CDN Egress IPs and connection forwarding
84+
accDescr: Diagram showing IPv4 connection forwarding for Dedicated CDN Egress IPs - Same data center.
85+
A[Client]
86+
subgraph Data center A
87+
X[(Cache service)] --> B[(Egress router <br/> <small>*has applicable IP</small>)]
88+
end
89+
C[(Origin server)]
90+
91+
A --ingress--> X
92+
B --egress--> C
93+
```
94+
95+
### Connection forwarding is needed
96+
97+
If the server does not have access to an applicable IP, the following options are checked and the first that is possible will take place:
98+
99+
* Another server in the same data center has access to an applicable IP and the connection is forwarded to that server.
100+
101+
```mermaid
102+
flowchart LR
103+
accTitle: Dedicated CDN Egress IPs and connection forwarding
104+
accDescr: Diagram showing IPv4 connection forwarding for Dedicated CDN Egress IPs - Same data center.
105+
A[Client]
106+
subgraph Data center A
107+
X[(Cache service)] --> B[(Egress router <br/> <small>*no applicable IP</small>)]
108+
B --> Y[(Egress server <br/> <small>*has applicable IP</small>)]
109+
end
110+
C[(Origin server)]
111+
112+
A --ingress--> X
113+
Y --egress--> C
114+
```
115+
116+
* Another data center in the same location has access to an applicable IP and the connection is forwarded to that data center.
117+
118+
```mermaid
119+
flowchart LR
120+
accTitle: Dedicated CDN Egress IPs and connection forwarding
121+
accDescr: Diagram showing IPv4 connection forwarding for Dedicated CDN Egress IPs - Different data center.
122+
A[Client]
123+
subgraph Location 1
124+
subgraph Data center A
125+
X[(Cache service)] --> B[(Egress router <br/> <small>*no applicable IP</small>)]
126+
end
127+
subgraph Data center B
128+
B --> Y[(Egress server <br/> <small>*has applicable IP</small>)]
129+
end
130+
end
131+
C[(Origin server)]
132+
133+
134+
A --ingress--> X
135+
Y --egress--> C
136+
```
137+
138+
* Another data center in a different location has access to an applicable IP. The closest location is selected and connection is forwarded to that location.
139+
140+
```mermaid
141+
flowchart LR
142+
accTitle: Dedicated CDN Egress IPs and connection forwarding
143+
accDescr: Diagram showing IPv4 connection forwarding for Dedicated CDN Egress IPs - Different location.
144+
A[Client]
145+
subgraph Location 1
146+
subgraph Data center A
147+
X[(Cache service)] --> B[(Egress router <br/> <small>*no applicable IP</small>)]
148+
end
149+
end
150+
subgraph Location 2
151+
subgraph Data center C
152+
B --> Y[(Egress server <br/> <small>*has applicable IP</small>)]
153+
end
154+
end
155+
C[(Origin server)]
156+
157+
158+
A --ingress--> X
159+
Y --egress--> C
160+
```

src/content/partials/aegis/connection-reuse.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ Implemented by HTTP/1.1, connection reuse describes multiple requests passing th
88

99
For example, when a connection is initiated for `shop.example.com`, several embedded subresources may be requested - CSS, image files, advertisement, etc. This can mean hundreds of requests just for the website to load. Instead of having a one to one ratio of request per connection, a single connection is used for multiple requests.
1010

11-
With HTTP/2, requests can use the same connection even if they are for different domains.
11+
With HTTP/2, requests can use the same connection even if they are for different domains (also known as connection coalescing).
1212

1313
For example, a connection initiated for `shop.example.com` can be used for requests for `blog.example.com` as well - as long as the requests have the same destination IP:port and the server TLS certificate is authoritative for both hostnames.

0 commit comments

Comments
 (0)