News for hackers. Stuff that matters.
Re:Startups Open Sourced, 1 Week Later: $10,000+ in Revenue by mootothemax on Sunday May 01, 2011 @04:03PM (#2503914)
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 :)

Re:Startups Open Sourced, 1 Week Later: $10,000+ in Revenue by petercooper on Monday May 02, 2011 @09:09AM (#2506096)
Good 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).
Re:Startups Open Sourced, 1 Week Later: $10,000+ in Revenue by mootothemax on Monday May 02, 2011 @12:30PM (#2506799)
Good 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 ;)

Re:Startups Open Sourced, 1 Week Later: $10,000+ in Revenue by petercooper on Monday May 02, 2011 @01:03PM (#2506946)
Yeah, 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.

Re:Startups Open Sourced, 1 Week Later: $10,000+ in Revenue by jmtame on Sunday May 01, 2011 @04:52PM (#2504056)
i 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.