For an application with the traffic and size of, maybe, twitter?
Ask HN: Server Infrastructure recommendations for a PHP app
1–10 of 14 posts
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#2Seriously, as your application grows, you'll improve your infrastructure. Nothing kills a project as easily as building an infrastructure for millions, for an app with only a few users.
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#3You're going to have a very beefy load balancer, behind which sits a bunch of nginx installs and you'll have likely thrown CI out the window because, even though it's fast for a PHP framework, it's not fast enough for what you need. You'll be using PHP, likely with a few homebrew extensions written in C.
Or you could just use Node. It has non-blocking IO. :D
Realistically, write it on a crappy linode with the default MySQL install and your PHP framework of choice. If you ever get as big as twitter, you can worry about scaling up to that size then.
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#4Re: Ask HN: Server Infrastructure recommendations for a PHP app
#51. Sit PHP-FPM behind nginx for a bank of persistent PHP interpreters. Access this via a Unix socket.
2. Use Memcache to cache your records.
3. Use APC to cache your PHP byte code.
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#6Re: Ask HN: Server Infrastructure recommendations for a PHP app
#7You might want to reach out to PHPFog ( https://phpfog.com/ ), as they (can) offer what you need.
They offer on-demand scaling, and a very generous entry level pricing. Their free app is great for small tests and quick deployment tests.
Disclaimers:
PHP Fog and Orchestra.io use Git for deployment. You point your machine/instance to a repository and it will keep it updated when you commit and push changes.
These services are built with scalability in mind (read: multi-server or variable performance single server). So, it's encouraged that you have a solution for hosting and serving static content, (javascript, css, images, etc..). Obvious examples are Amazon S3, Rackspace CloudFiles, etc...
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#8I believe Twitter was initially built on ruby on rails ... They had a lot of issue (the unpopular fail whale) . Did they switch to some other platform?
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#9For an application with the traffic and size of twitter, you're going to need at least three dedicated DBAs managing your MySQL installation (never have an even number of DBAs - it leads to tyranny), which is probably going to be spread out across a cluster of replicated servers. You're going to have a very beefy load balancer, behind which sits a bunch of nginx installs and you'll have likely thrown CI out the windo…
Please explain.
Re: Ask HN: Server Infrastructure recommendations for a PHP app
#10Just get a cheap VPS. If you were hosting an application the size of twitter, you wouldn't be asking on HN for advice :-) Seriously, as your application grows, you'll improve your infrastructure. Nothing kills a project as easily as building an infrastructure for millions, for an app with only a few users.