3 ms·
Performance/scaling?
by grok2 10y ago
Performance/scaling?
- bkanber 10y agoPHP is perhaps one of the easiest technologies to scale horizontally, because of its statelessness.
- egh5oon 10y agoHA!
- bkanber 10y agoYou should add substance to your comment. If you disagree, say why.
- aikah 10y ago> PHP is perhaps one of the easiest technologies to scale horizontally, because of its statelessness. PHP is no more stateless than any other language out there. Statelessness is a design choice, not something PHP gives you for free. If your app write things on the local disk or use the default PHP session handler then it is not scalable by default. In order to write code that scales you need to make it scalable, it's not something automatic and certainly not special to PHP.
- bkanber 10y agoI would argue that PHP is more stateless than Node, for instance. Things that happen in previous requests do not affect following requests in PHP, unless you're explicitly using shared state. That's not the case in node, it isn't the case with most Java HTTP server implementations, and it wasn't the case in Rails back in the day (don't know how it is now).
- minitech 10y agoAny language is stateless until you explicitly share state; the other languages just make it easier to share state. It’s not a bad design decision – makes them more versatile, or at least more cleanly usable outside of serving webpages – but is something to avoid in similar applications for sure.
- wtetzner 10y agoI'm pretty sure PHP supports sessions. I am missing something?