When Manchester City announced the signing of Pep Guardiola this week as their manager, the unusually high traffic to the club's website made it crash. Ouch! You would expect a big club like Man City to be better prepared. However, they had a damage control strategy that helped them overcome the crash with limited damage.
While there is no magic method that ensures your website will never crash, there are definitely measures you can take to minimize the chances of that happening to your website. With that said, there are some variables out of anyone's control: the amount of traffic you estimated to get during your big publicity moment may go wrong or your data centre could go down because of a natural disaster but those are extreme cases. Most real life scenarios are relatively easier to handle. For example, you can make your website more stable by following a few tips.
1. Choose the right hosting
It is important to choose the right host and the hosting plan. When you're expecting high traffic, you can't go for a shared hosting plan as you will be needing a fast processor, lot of RAM, a fast storage device, SSD and high bandwidth. A dedicated hosting plain is a good option when you expect high traffic.
2. Use CDN, Version Control and Error Minitoring Tools
CDN (Content Delivery Network) is a network of servers that deliver cached static content from websites to users based on the geographic location of the user. CDN distributes the load to multiple servers instead of letting your main server take the entire traffic thus making it less likely to crash.
Version Control (Ex: Git) allows you to keep your code organized, track changes, and quickly revert to a stable version if a crash occurs due to a bad code update. Error monitoring tools (ex: Sentry, Bugsnag) continuously monitor the website for errors or exceptions. Error Monitoring helps you detect issues early and fix them before they affect users, ensuring you're always on top of potential problems that could lead to crashes.
3. Test your website & its performance
It is important to test the software or CMS that powers your website. Old versions may have bugs that can lead to website crashes. The other important thing to test is the performance of the website when subjected to simulated high traffic. The test results can help in deciding what should be improved and if it makes sense to increase the server capacity.
A website crash is going to leave a negative impression of your brand on the minds of your users and you're going to lose business quickly but here is your chance to be prepared adequately. A properly devised damage control strategy will help in overcoming the crash.
What can you do when your website goes down?
1. Check your host
If your website has crashed, always check your host. Your host may be experiencing problems (Here is an example). In that case, you should get in touch with their support team directly and it can help you decide whether to continue with the same provider in the future depending on the quality of support they provide and time they take to sort things out.
2. Find out the root cause of the crash
Finding out the root cause of the crash can help in sorting the problem and getting your website back up and running. Some of the common problems that cause website crashes are
Overwhelming demand (Extremely high traffic): Configure your infrastructure to automatically scale resources based on traffic demand. Alternatively, you can also set up queing systems.
Server maintenance by your hosting provider: You can prepare for this in advance by either setting up a maintenance page on a secondary host, or load the website from a backup server.
Network configuration issues: This often stem from incorrect server settings, firewall problems, or issues with DNS. To address these, start by checking server logs and configuration files for errors. Ensure proper file permissions and firewall rules are in place. Review DNS settings for accuracy and propagation. Consider using uptime monitoring tools for proactive detection and resolution.
Natural disasters causing troubles to your data centers: This is extremely extremely rare. Disaster recovery systems aim to restore services quickly, but depending on the severity of the disaster and the availability of backup systems, recovery times can vary. Backup servers in a different data center are your interim solution, provided there might be some data loss if your servers are not synchronized.
Mistakes in your website's code: Check error logs in your server, or error monitoring tools (like Sentry). You would always have the option of a rollback to the last stable version assuming you're using Version Control (ex: Git) until you find the issue in your code and sort it out.
Deepak founded VizConn in 2011 and currently serves as the Principal Consultant, leading the charge on CMS and AI adoption for clients across APAC, EU, and NA regions. Let us know and we will pass it on to him. He responds to most questions via email.