
A CDN, or content delivery network, is a content distribution system that improves loading speed and delivery for users around the world. These networks place your website’s content (images, video files, scripts and so on) on many servers spread over a wide geography, which cuts the physical distance between users and the origin server, and that in turn makes web pages load faster.

If your site is taking a DDoS attack
you move onto Cloudflare or any other CDN, put the whole site behind a captcha, and it stays behind that captcha for a long time
your SEO and your sales both take a hit
Some of our clients have been sitting on this option for a long time and are willing to lose 100 million or 200 million Toman
but they will not spend a small amount to fix the problem
and after that, your SEO is not easily recoverable
Never enable Cloudflare’s Under Attack mode under any circumstances
we have a client who is under DDoS pressure and bought an expensive server so it could withstand the DDoS, yet he does not turn on Under Attack
because the damage that option does is damage that no expensive server would do to him
CDN operation explained
How it works:
- When a user sends a request to the origin server, the CDN takes that request and decides whether to send the content to the user from the origin server or from one of its own servers. Those servers are spread across different parts of the world.
Advantages:
- Speed: faster web page loading and less load for images and multimedia content.
- Efficiency: less pressure on the origin server and better website performance.
- Security: some CDNs offer security features such as a WAF (Web Application Firewall).
- Access to local resources: local resources are available to the users in each region.
Processing stages:
- Detection: the CDN works out which requests need content moved from the origin server to its own servers.
- Preparation: the CDN takes the content from the origin server and stores it on its own servers.
- Distribution: the prepared content is distributed to users around the world.
Types of CDN:
- Public: networks that any website or application can use.
- Private: networks dedicated to one organization or brand.
The best-known CDNs:
- The best-known are Cloudflare, Akamai, Amazon CloudFront, Fastly, KeyCDN and StackPath.
Keep in mind that the choice of a CDN should rest on your needs, your traffic volume, where it will be used, security features and price. Testing and evaluating with real content can also help you find the best one for your project.