I want to put the static pictures on the website into spacing and enable CDN acceleration, and use the URL of the CDN endpoint to access the pictures in the code. How can I limit the traffic of the CDN and the number of visits within a certain period of time when the website is accessed or even attacked on a large scale?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
To limit traffic and requests for your static assets, you can use CDN rate limiting and DDoS protection. Rate limiting can be implemented using third-party CDN providers like Cloudflare, which allows you to set custom rules for traffic and requests mitigation. You can also explore the Cloudflare firewall settings to block or challenge requests matching specific criteria.
Additionally, consider enabling DDoS protection services, like DigitalOcean’s Cloud Firewall, to protect your website from potential attacks. Cloud Firewalls are free and perfect for staging and production deployments.
Have in mind you can implement additional rules on your droplet as well. If you run
iptablesyou can set certain rules or have your web-server (Apache/Nginx) to block access to specific resources.
Hope that this helps!