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

Unless you're writing in pure hand-optimized assembly language, 3 orders of magnitude in performance is way more than you could claim. PHP web requests commonly execute in hundreds of ms (of course, here I generalize mercilessly, but that covers most of cases I know of and that's what most sites aim for). So you say your non-PHP requests which would do the same thing would finish in hundreds of microseconds? I have very hard time believing it.

> And it’s the reason why even with PHP you use things as opcaches, cache database results in external daemons

You make it sound as if the idea of caching was invented by PHP programmers to address language deficiencies. Nothing can be further from the truth. Everybody uses caches, because it's faster. If you don't use DB cache, there's no way in the universe you can make you app fast under any significant load.

> And hacking those things on top of PHP make your program even worse to reason about

You have very strange view of performance design if you think using caches is "hacking something on top" and has to be avoided.

> than just using a daemonized system with actor framework.

This looks like a complete non-sequitur - you could use actor framework and still use all the things described above, and do it in PHP, and thousands of people do exactly that. On not in PHP, if you'd like - this pattern is completely orthogonal to the language used.



> So you say your non-PHP requests which would do the same thing would finish in hundreds of microseconds?

I had a side project written in Elixir/Phoenix make it onto the front page of HN and it indeed was the case that the majority of requests were in hundreds of microseconds. The default log messages actually use "µs" which is kind of cute.

I wrote about it here[0] and extracted a random sample of my logs and you'll see that most of them were in the hundreds of microseconds.

[0] http://gabe.durazo.us/tech/ephemeral-p2p-project/


Yeah, I giggled with glee the first time I really paid attention to how long my Phoenix requests took.


The system now used to serve GoDaddy's Website Builder content is written in node, deployed to clusters behind load balancers, and from there connecting to Cassandra clusters for the data... iirc, the average turn around time for a given request (including dynamic ones) is less than 12ms from the node server receiving the request to delivering the response, under a load of many millions of requests per second to the system.

Disclosure, I worked at GD in Website Builder when this was being developed, but haven't been there for over 2 years now.


> So you say your non-PHP requests which would do the same thing would finish in hundreds of microseconds? I have very hard time believing it.

Yes, they do. Phoenix/Elixir is a nice way to get below the millisecond, and even with Java you can for most requests go below a few milliseconds.

And you can obviously handle far more requests at once, as you have all the code already loaded in RAM, and just need to jump into it, instead of reparsing it, or copying it back from a cache.


I think his main issue is that the cache has to operate outside of the application process, adding overhead. Languages with shared state can have much simpler and more efficient caching, no io, no de/serialisation.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: