If you're working with DriftPHP and you only can deploy a single server, then you're intended to deal with only one CPU. You could balance between different instances of the server, but what if you can't?

Thread []
I've been working in adding Drift as a PHP framework in this list - https://github.com/the-benchmarker/web-frameworks/pull/3800 - and I'm not very happy with the results.

10 threads, 64 concurrency -> 6125reqs/sec, which in absolute terms is not a bad number if you know what it represents

...
This numbers are the result of benchmarking a single DriftPHP server with one, and only one, CPU.

Of course, you must count the Kernel layer here, which adds a small cost per each request, but taking in account what this kernel allow us (events, bundles...), seems good.

...
What happens here is that, lots of Frameworks can work with all CPUs at the same time, by using for example Nginx workers, or simply by using some PHP libraries that make that work. This is not the case of DriftPHP.

And is not about this ranking, is about real life.

...
What if someone wants to deploy a single DriftPHP server, without having to deal with balancers, and want to maximum power of the server (all CPU cores)? Shouln't this be an option inside the DriftPHP server?

And this is something I'd like to check.

https://github.com/driftphp/server/issues/72

...
I'd like to know ideas for that.

How would you achieve something like that?
How would you replicate N kernels, 1 per thread?
What do you think @zhukserega ?
You can follow @mmoreram.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.