Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you not fix the media problem? Putting nginx up front to serve media would relieve a lot of huge Apache/PHP processes.

Are you actually hitting the limit in practice? So you have 50+ concurrent requests at once? Is this a "real business"? If so you shouldn't be so afraid of putting in the time to setup nginx or something else... you'll literally _have_to_ to different media serving and load balancing if you plan to grow whatever_this_is.

As far as actual RAM usage, you'd probably save some space and lose very little (depending on what your app does) on a 32-bit OS. Sadly, Slicehost only offers 64-bit... you might check out Linode or one of their other competitors. I'd only suggest this option if you're really broke, though. You'll still have to do the work mentioned above on Linode eventually... the 64->32 would only be a small stopgap.

I don't do any PHP anymore, but I think thread-safeness largely depends on what external C libraries you use, and generally isn't guaranteed.



> Sadly, Slicehost only offers 64-bit

Here's a comparison I wrote up a while back:

http://journal.dedasys.com/2008/11/24/slicehost-vs-linode


Putting nginx in front of Apache will also help decouple the Apache backends from spoon feeding slow clients and idling on keepalive connections. The overhead of the extra data copies is irrelevant for most cases.


"you'll literally _have_to_ to different media serving and load balancing if you plan to grow whatever_this_is."

I guess my point is that it's a mod_php issue and I may not need nginx. My plan is to try a threaded apache without mod_php and use mod_fcgi for php. If that doesn't work then try a threaded apache with mod_php and see what happens.

Another solution is find another provider that offers more memory and similar service for the same price. But it will be hard to match slicehost's service I think.


fastcgi with Apache will be a waste of your time I think.

Apache+php is solid, but a memory hog. If you want to keep things simple, move to Nginx with php+fastcgi. This is the suggested config for Slicehost.

Or, as previously suggested, offload the client connection to an Nginx server sitting in front of Apache. This will relieve the pressure on the php instances and will also handle static file serving.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: