How to prepare for a traffic surge?

Web-Traffic.jpg

Expecting a traffic spike? This may bring a lot of problems for your server, if you don’t use a CDN (content delivery network) that distributes load over several servers. How to make sure that your website is ready for traffic surges? These tips will help you to achieve maximum website availability, no matter if you use a CDN or don’t.

Be aware of your limits

If you don’t know the limits of your hosting plan, you should contact the hosting provider and ask about its specifications. Although many CDN providers and hosting companies try to keep servers offloaded with the help of caching and request filtering, some amount of traffic will still pass via the host. Knowing exact limits of the hosting plan, you will be able to scale in time and prevent bottlenecks.

Filter unwanted requests

Some hosting providers allow blocking either individual IP addresses, or IPs of certain regions. To block traffic from some locations, specify settings in the control panel. This function is particularly useful for websites with definite target audience. You will both save traffic and repel attacks from some regions.

Use certain IP addresses

Server can be protected in the peak season, if you configure your firewall to accept traffic from provider’s IP addresses solely (this measure should be temporary). If you accept only providers’ IPs, malicious traffic coming to your IP can be deterred.

Ensure that provider’s IPs are whitelisted

Typically, a CDN provider operates as reverse proxy for user’s website, and all connection come from its IPs. If you eventually restrict provider’s IPs, users may have problems with access to the website. Therefore you should include all provider’s IPs in the white list.

Customize caching

By default, CDN caches static content, but this option can be customized in Page Rules. Open this section, and select “Cache everything” option (you can activate it either for the entire website, or its sections). Cache Everything function helps to reduce the number or times the provider needs to address to the origin to download cacheable objects. On this page you can also specify Edge Cache Expire TTL and the Browser Cache Expire TTL to define for how long cached assets can be stored.

Using these tips you will be able to control traffic and avoid overloading of the origin server. Keep in mind that CDN solutions greatly reduce the risk of website breakdown.

 

 

Leave a comment