4 Wordpress sites, 1 server – great performance on Digital Ocean with Nginx
lukespear.co.uk
lukespear.co.uk
I purchased the $40/m plan on DO and started to move my sites over. In the process I learned a whole lot about configuring my own server. I got a pretty impressive setup going now and monitor it on New Relic. It really only took me a few weeks to learn everything and get all my sites stable. It's been several months now and have had to hardly ever login to my server to touch anything. Initially I was worried that I'd have to manage my sites and it'd suck up some of my time but really I'm actually saving time because I don't have to deal with HostGator or going over the limit with WP Engine. I'm saving $110 a month, I learned a whole lot in the process, and it really did not take much time to learn nor is it much of a maintenance at all to run.
I wonder if a low-cost provider will offer the one-click installs we all came to appreciate with decent shared hosts, along with a decent back-up system.
Fortunately, I was running nginx and one of the WordPress caching plugins (W3 Super Cache or W3 Total Cache, I forget which) and had spent a fair amount of time trying to tune the whole setup.
The VPS managed to serve ~200k visitors over a period of a few hours without any issues whatsoever. I was pretty amazed since this particular page has a LOT of images (Pingdom's Website test for the page reports 158 requests and 1.4 MB in size).
Nowadays, I run nginx and varnish on a physical server with four 2.2 GHz cores and 16 GB of RAM. It definitely doesn't have any problems keeping up. After the snapchatdb.info site got shut down by their provider, I hosted it for them and served up ~30 TB over a few days.
Also, it's pretty well known that Wordpress is a dog in its standard configuration. Using some sort of caching mechanism is required if you have any kind of traffic to the site (some like W3 Total Cache).
While there are fun benchmarking services like the blitz.io and LoadImpact.com, you can normally get a pretty good feel for how your site will do under a load using "ab" (apache benchmark) from your local machine. This will at least let you test dynamically generated pages to make sure caching is working properly. Plus using some like Google PageSpeed to verify browser caching is properly being enabled by your webserver.
APC is a nice alternative to dealing with something like memcache (since you are working on a smaller scale).
> ...you can normally get a pretty good feel for how your site will do under a load using "ab" (apache benchmark) from your local machine.
A single web server can easily out-serve the vast majority of internet connections you get at a home or office. I have 35 mbps down, 5 mbps up, and I can saturate my link (usually uplink) well before our web/app servers choke up.
If you're testing a VPS at a provider like DO, you can spin up the cheapest Droplet in the same datacenter, then use it to test. Run your benchmarks in one shell session, while keeping another open with iptraf running to make sure you're not running in to network overhead.
I know this sounds like overkill, and you qualified with "pretty good feel", which could very well mean "find out if your web server falls over at 10 concurrency", but it's always amazing to me how quickly bottlenecks creep in and muck up benchmarking results.
We're moving to OVH and their "infrastructure" line. We get a true VLAN, and the overall cost is ~1/3 of what DO charges for the same compute, RAM and bandwidth. Plus we get dedicated hardware, and 2x3TB hard drives in addition to the SSDs we're adding ($7/month extra). The plan is to use the hard drives to offload our current usage of S3, which'll save another $100K or so annually.
I also suspect OVH has "better" bandwidth than DO—more POPs, backbone providers, etc. I actually really like how they're doing things over their now. In the past, it seemed much more complicated, but their current lineup is substantially easier than AWS to understand and price out. It doesn't seem "gimmicky" at all, at least at the high end.
I would, though, add a few words of caution here.
1. It is one thing to put together a VPS to run a bunch of sites. It is another to handle major traffic on it. Some of you have done it, some of you will learn with time how to do it, but a large number won't. If it is critical for your site to be up 24/7 and Google is going to be your best friend in trying to understand which part of the stack is creating the bottleneck, you'll be in for some real trouble.
2. Do you know how to check for rootkits? Would you know if your server has been backdoored? These days attack vectors are so complex that even experienced hands (the main reason why I don't do this on my own anymore) have trouble saying for sure they are fully locked down. Wordpress on a public static IP represents one of the juiciest targets on the web for hackers and a big chunk of the phishing sites are hosted on servers with unpatched Wordpress installations or plugins/themes that have backdoors in them. Most of the site owners have no clue they've been owned till the hosting company takes them down. Please don't wind up being one of those site owners.
If you are going to do this own your own, at least get something like Wordfence installed, so that you have some degree of protection in place.
I run most of my sites these days on Webfaction. I believe they run Cloudlinux these days, which means you get pretty consistent performance from the server, even in the shared hosting environment. The sites with greater resource requirements are moved to Wiredtree, who provide beefier, managed VPS services at reasonable rates as long as you are OK with cPanel and don't veer too much from their standard stack.
Disclosure: I have no business links with Webfaction or Wiredtree.
At my end I try to keep things patched, check the listening ports and run Tripwire, rkhunter etc.
Cheers for the Wordfence tip, I'll take a look.
Of course, all of these are very low traffic sites.
There was definitely a learning curve, especially with nginx and Wordpress. I'm much more of a web developer than a server admin, but once everything got up and running, there's very, very little in terms of day to day maintenance.
I used to be on a shared host but also ran into issues with memory and general downtime. Not to mention there is something liberating about having your own (virtual) box.
Linode have great hardware, too. I can see how 15 sites would be possible. It's pretty incredible, really. As mentioned elsewhere, if only Wordpress could run on sqlite, trending towards less resources rather than more...
My main personal website is on dreamhost, and I have been using them since about 06, and they are great for simple domain controls, but I really like DO because I like having root, and having snapshots if I jack something up.
I personally like to be involved as far down the stack as I can get (to gain some experience) -- great read. Also, I recommend INIZ, they're pretty cheap (~9GBP/month), and offer pretty stable service.
This level of control and xp points gained can't be had elsewhere, at least not at an affordable monthly price.
I think Wordpress is big and bloated, but it sure is easy to use.
Further, the real resource jump comes from 0 to 1 Wordpress sites. 1 to 4 is simply the overhead of handling connections. No new Apache or mysql processes are needed...
Over here: https://news.ycombinator.com/item?id=7238107
I have upgraded to the 10$ instance, and still could barely navigate in the wp admin area..
This took 2-3 days, now the site looks to be ok (traffic has dropped to 150 day), i think it was a memory issue with their server..
Also if i do a : ab -n 500 -c 200 http://site.com from another server my site stops working..
full config and details are all here. Not sure since this post really doesn't actually share much, but I think my performance was a lot better.
http://reviewsignal.com/blog/2013/08/29/reverse-proxy-and-ca...
You didn't mention your server spec, or confirm that your site is dynamic/Wordpress and not static?
* It made sense traffic/memory wise to go to 2gb, but all of the sites are 'behind' cloudflare and that seems to help a lot as the server rarely starts breathing hard...
In any case it is a small load, but we moved from a shared host setup where we had these old sites sitting and they were beginning to bring down the server. They weren't into installing APC or Memcached; we were able to handle the traffic on the 512mb server using Apache, Cloudflare, APC and Memcached and the sites are faster (also using Google's pagespeed module). I've upped the server memory now, mostly because the WP admin is slow and the cost is still much less than we were paying before...