News for hackers. Stuff that matters.
Re:Go with PHP by o1y32 on Thursday May 11, 2023 @08:08AM (#35900986)
"500,000 orders per month"

That's like, what, 12 orders per minute? Is this meant to be impressive or something? I bet any language run on a modern laptop can handle that.

Re:Go with PHP by randshift on Thursday May 11, 2023 @08:37AM (#35901193)
I thought the same thing. PHP is a fine tool but that is not a value add statement. The code can "handle" anything, it's the underlying OS and related systems that limit the load.
Re:Go with PHP by paledot on Thursday May 11, 2023 @08:43AM (#35901240)
Or smartphone.
Re:Go with PHP by ceejayoz on Thursday May 11, 2023 @08:47AM (#35901270)
"when hosted on a $6/month server"

Dropping half a sentence will often make it sound goofy, yes.

The point being made is "you don't need a massive K8s infrastructure to handle hundreds of thousands of orders a month". Most people don't; https://www.joelonsoftware.com/2001/04/21/dont-let-architect... is an oldie but a goodie on the subject.

Re:Go with PHP by pdimitar on Thursday May 11, 2023 @09:24AM (#35901665)
> "when hosted on a $6/month server"

So with hardware specs better than the Chinese laptop I bought second-hand for 150 EUR (which has a Celeron J CPU), the very same one that can serve 2000 req/s on Elixir and 5000 req/s with Rust, then?

Sure, waiting on the DB is often 95% or more of the request, I get it, but 0.2 requests per second (which is the 500K orders per month when you do the math) is nothing to brag about regardless of which language or DB are being used.

It's even below the level of having a bash script doing the heavy lifting.

Re:Go with PHP by smt88 on Thursday May 11, 2023 @08:54AM (#35901333)
> "you don't need a massive K8s infrastructure to handle hundreds of thousands of orders a month"

This is true of many languages that are slower and faster than PHP. It's not useful as evidence of PHP being a better choice for anyone.

Re:Go with PHP by ceejayoz on Thursday May 11, 2023 @09:49AM (#35902053)
It's not an argument of "this is the absolute best possible choice".

It's an argument that raw language performance in this sort of context isn't going to be the problem for 99.9% of people developing code. If you have 500k orders a month, you can afford more than $6/month in hosting.

I sometimes see folks post on StackOverflow trying to micro-optimize things like string concatenation or single versus double quotes that make perhaps a second of CPU difference in a million executions. The point is directed at those folks; the ones who are thinking "language X is faster, and for that reason alone I should use that instead".

Re:Go with PHP by giaour on Thursday May 11, 2023 @09:24AM (#35901663)
Boasting about 0.2 requests per second, even on a minimally spec'd VPS, is damning with faint praise.
Re:Go with PHP by sgjohnson on Thursday May 11, 2023 @12:39PM (#35904671)
An "order" would involve far more requests than just one however...
Re:Go with PHP by pcnix on Thursday May 11, 2023 @09:13AM (#35901545)
That was a bad way to make the point, because you could serve five orders of magnitude higher with PHP, or node or go or python or pretty much any language right now.

On top of that, You don't need massive k8s infra for any other framework either, so it isn't really a selling point for PHP itself.

Re:Go with PHP by 5Qn8mNbc2FNCiVV on Thursday May 11, 2023 @11:13AM (#35903353)
Unpopular opinion: If you use k8s mostly for scaling, you're using it for the wrong reasons.

Also the numbers are still irrelevant for the server because if you do 500k orders a month you owe it to the users to respond faster than 1s and also be highly available (just take 3 servers somewhere idc about anything else)

Re:Go with PHP by neurostimulant on Thursday May 11, 2023 @09:59AM (#35902196)
For every request that generates an order, there are probably a dozen or more requests that doesn't generate any order. Also, OS these days are so bloated a $6 vps will barely has any memory left on startup before you actually run any workload on it.
Re:Go with PHP by jsd1982 on Thursday May 11, 2023 @10:31AM (#35902652)
try a nanode from linode. $5/mo and as bare-bones as they come. no bloat there.
Re:Go with PHP by winrid on Thursday May 11, 2023 @01:47PM (#35905628)
A $5 linode with debian 11 has like 950mb usable on boot?