Does a CDN improve the TCP slow start process?

Hello, this question is not directly related to Cloudflare but I think this forum is the best place to ask it. I’m wondering if a CDN like Cloudflare will improve the TCP slow start process.

Let me explain a bit. In the TCP slow start process, the server has to wait for the ACK message from the client to send the next message. So each message circle cost a Route Trip Time (RTT). Please consider the image below:

To build up the connection to cwdn = 8 we need 3 RTT. Let’s say the average RTT = 100ms, so we have to wait 300ms to build up the connection to cwdn = 8

Now consider the case when CDN stands in the middle of the server and the client. I want to talk about the case in the CDN serves the result from the server directly

I’m assuming that the CDN will create two different TCP connections. One is from the server to the client and the other one is from the CDN to the client. I’m not sure about this, please correct me if I’m wrong.

As we can see it still takes 3 RTT to build up the connection to cwdn = 8. But the RTT here is different since two TCP connections are processing simultaneously. Let’s say in the ideal condition, the RTT from the server to the CDN is 70ms, and the RTT from the CDN to the client is 50ms. So we have to wait 70 * 3 + 50/2 = 235ms to build up the connection to cwdn = 8. So in theory, our TCP connection will be built up faster if there is a CDN stay between the server and the client

It would be nice if someone can explain to me whether the assumption of me above is wrong or not. Thanks in advance

1 Like