Hacker News new | ask | show | jobs
by user5994461 2867 days ago
>>> And it can scale just fine, easily as well as Python or Ruby if you dig into how to do it right.

The webserver is scaled by just adding more instances in parallel with a load balancer. It's the database that needs to scale and that's the challenge.

2 comments

Absolutely, though I'd warn that if you naively use PHP and a default setup (Apache with default settings for PHP or something like that), you're probably not going to serve as much traffic per server as a naive Python or Ruby setup will get you. You have to tune your way there, and it can be a bit of a process, but it's definitely possible, and there's nothing very subtle about it.

One of the biggest problems with PHP, IMO, is that most of the code you'll find online is extremely old, and probably will give you terrible advice, using old deprecated mysql libraries, etc.

And don't you have to reopen database connections for each php request? Even that seems fairly difficult to scale, unless there's a way around it that I'm not aware of (I don't use php very often, definitely not at scale).
Of course not. Connection pooling is the most basic feature of any database library. It would be really shocking if PHP didn't do that.