

Ask HN: My website is about to get a lot of traffic, what do I need to do? - escapologybb

My project is about to appear in a major online magazine with 1.8 million monthly readers, it’s going to include a link to the website so it’s going to mean a lot of visitors showing up at one time and I don’t want the website to buckle.  Obviously.<p>At the moment, the website has had a minuscule amount of traffic and is running on the the smallest Digital Ocean droplet, I suspect and call me prescient here that I might need some more resources!
The website is statically generated using Jekyll, the operating system is Debian 7.0 and the web server is nginx.  Is there anything else I can give you guys to help the question?<p>So, can you advise me on what I need to do to give me the best chances of keeping my website up and running under such potential heavy load?  I’m not a Sys-Admin and I’m reasonably new to using Linux, so the potential for huge mistakes that I’ve already made is quite huge so don’t be afraid to suggest the obvious :-)<p>Thanks in advance!<p>These are the stats from the  Digital Ocean dashboard:<p>Active 512MB Ram 1 CPU 20GB SSD Disk Amsterdam 2 Debian 7.0 x64
======
edent
1) Static site generation is generally faster.

2) Minimise all your resources. Use PNGquant,
[http://www.smushit.com/ysmush.it/](http://www.smushit.com/ysmush.it/), or
similar tools to make sure that you're not needlessly serving huge images. Do
the same for video, JS, and CSS.

3) Turn on GZIP support! You'd be surprised at how much of a difference this
makes. It will add a minuscule amount of overhead, but will save you in
transfer times and bandwidth.

4) Manually set your caching headers to ensure that clients aren't requesting
the same files again and again.

5) Ignore all of the above and get a CDN to do the hard work for you. I use
[https://www.cloudflare.com/](https://www.cloudflare.com/) \- on a barely
optimised WordPress site and it has coped with 50,000 views per day.

~~~
escapologybb
Hi, thanks for the response.

Regarding number three, is that configuration option in nginx or Jekyll? Same
question for number four?

I might go with CloudFlare but they don't do SSL support unless you plump for
the premium plan, which I might do if I don't manage to configure everything
properly myself.

Thanks again

~~~
edent
I don't know the exact technologies you're using, but I'd assume they were in
the underlying server - so nginx.

------
pwg
> The website is statically generated using Jekyll,

Static websites can serve a very large amount of traffic as compared to
websites where each page results in a database call to generate.

One open source tool to stress test a website is JMeter:
[http://jmeter.apache.org/](http://jmeter.apache.org/)

You could do your own pre-stress test and see what the VM can produce. Then
you will have actual numbers, rather than guesswork, to use to decide what you
want to do.

[edit: fix typo]

~~~
mattkrea
Agreed. I can't imagine you'll have to do anything more than maybe step up to
the next droplet size.

Nginx is widely known to be remarkably well-suited for serving static content.

------
hostingfront
Try cloudflare

~~~
escapologybb
I would use CloudFlare but you can't use SSL certificates unless you step up
to the premium plan, which I'm willing to do but want to explore other options
first.

