Geeky Duck

Website Traffic Load Dilemma: Scale First or to have the Traffic First?

When it comes to the website traffic load and scalability, it’s a chicken and egg question. Should I make my web server scalable enough before I have the traffic load? Or should I wait until I got massive traffic before invest on a better server?

The answer is: You shouldn’t wait!

Why you should not wait until you have the traffic?

I’ve faced this kind of situation a few times in the pass 10 years. One of my article gone viral and I’ve saw the viral effect exponentially grown and finally it killed my server. The odds are, you don’t get this kind of opportunity even once in a year. When you missed it, the opportunity is gone even you are able to get back with a 10 times faster server.

So, I would say you should make sure your website is ready to scale anytime.

Case Study: Viral Article From Facebook.

Back in 2016, one of my article gone viral on Facebook and the traffic was coming in like crazy. Traffic kept double up every 5 minutes until my server was slow to response. Soon, you will realize there would be google search traffic coming in. What was happening is the users were waiting too long for your website to response and they start to google the exact title of your article. Still, your website was slow responding and eventually down with an error 50X.

The screenshot below showing one of my article gone viral on Facebook:

Within 24 hours, I’ve learned the hard way to set up my first AWS EC2 instance with auto scaling enabled.  I got my AWS cloud server up and tried to recreate the viral effect by posting and promoting that post on Facebook.

In fact, the viral effect is no longer that strong. I believe that Facebook algorithm is smart. They somehow knew that they’ve sent too much traffic to your article and that’s equally killing your server. So, there is some sort of flag to put a limit of traffic they will send to your domain.

What about Google Search Traffic?

Google algorithm is way smart than anyone can imagine. I think the algorithm is smart enough to detect if they are sending too much traffic that are bringing your server down.

Through machine learning, Google somewhat knows your server limits and it will never rank the high search volume keywords for your website. If you had really great content, maybe Google once gave your site a chance, but your server just not responding after received some traffic spike.

What can you do?

1. Load Test Your Website and Know the Traffic Limit.

There are a few ways to load test your website. You can use Apache Bench for free load testing if you have the server root access. Otherwise, you have to use some third part load testing tools such as LoadImpact.

Read more:  Top 15 Load Testing Tools

2. Use Content Delivery Networks (CDN)

Please note that there are 20 – 100 of connections is making requests to your server when a single webpage is loading. So, by transfer the loads of CSS, JavaScript and image to CDN, you can save a lot of server resources to handle more traffic.

3. Move to a Scale-as-you-Go Platform

Move to Cloud Platform such as Digital Ocean or AWS. I think a Scale-as-you-go is the perfect solution. Although a cloud auto scaling platform can be slightly expensive than a dedicated server, it make sure you can easily scale in no time when you need it.

Conclusion

The conclusion is, Facebook and Google knows that if they keep sending the viral traffic to your server when your server is already busy, it’s equally DDOS Attack your server at the same time having a poor user experience for their users.

UX Sniff – Tracks and Understands User Behaviour in A Better Way

UX Sniff – Tracks and Understands User Behaviour in A Better Way

Nothing can be neglected and these days user experience is an important factor for the success of any business model…
Read more

So, it’s very important to know your server and continuous improve your website performance. Stay tuned with GeekDuck and We will share more handy tips and tutorial about website scalability, high availability and performance.