4 ms·
A tip for when you have a spare half hour - switch from Apache to nginx :) Let me convince you as to why: I have a 1GB VPS with prgmr.com, and it's comfortably
by mootothemax 16y ago
A tip for when you have a spare half hour - switch from Apache to nginx :)
Let me convince you as to why: I have a 1GB VPS with prgmr.com, and it's comfortably survived being top story on the Hacker News homepage, all whilst running my regular web apps running in the background.
Edit: If you're feeling really brave (or foolish - always a thin line), you could try setting up nginx now on a random port (e.g. 8080), and if it looks OK, kill Apache and move nginx to port 80. All depends on how much your server is struggling - would it be worth 20 mins downtime now if you don't have to worry about it again?
Edit 2: Looks like you're using Wordpress - are you using a cache plugin as well? If not, install W3 Total Cache right this very instant :) If you'd like any help with this, I'll be around for the next couple of hours, email is in my profile :)
- deleted 16y ago[deleted]
- jsprinkles 16y agoI've survived front page of HN and Slashdot with a 512 MB Linode, Wordpress and Apache. Configuration is everything and Apache's distro defaults are usually the problem, not Apache.
- jmtame 16y agoi noticed phusion passenger is supported on nginx as well, i'll look into doing this. thanks, hopefully this will work nicely on the 512 that i had with linode. also, i'm installing w3 cache right now. you'll probably hear from me.
- petercooper 16y agoGood advice but still not entirely necessary. I run several VMs and dedicated servers and have had numerous HN front pages and other high traffic leads to 1GB VMs running Apache (WordPress without caching, even). The issue here seems to be a less than optimal Apache configuration and not having just enough memory to handle the requests properly (but 1GB seems to be a sweet spot for a regular Apache setup nowadays).
- mootothemax 16y agoGood advice but still not entirely necessary The issue here seems to be a less than optimal Apache configuration I couldn't agree with you more. The problem is my Apache knowledge pretty much well starts and ends with setting up virtual hosts. A year ago I was having serious issues with my Apache set up, and spent hours trying to reduce its memory footprint, and playing with lots of other settings, all to no avail. So I gave up, installed nginx... and it just worked. Which is why I'm so evangelical about it :) That said, I'm certainly not against Apache; just the setup time and my abject failure. Which is, most likely, incompetence ;)
- petercooper 16y agoYeah, Apache is like a giant lump of clay you need to "sculpt" into something useful, whereas nginx is a fast and empty potter's wheel waiting for you to throw the clay on ;-) nginx is definitely well worth it if you don't have complex Apache-specific requirements. Another alternative I've been playing with lately is running haproxy on port 80 and then throwing requests to different daemons (like Apache and nginx) based on the host header.