ReactPHP Multi-Core Env
mortillan opened this issue · comments
Hi I am currently exploring ReactPHP and would like to know if there is a way for it to run multiple server instances on different cores of a multi-core machine. Same as Nodejs cluster. I tried searching but was not able to find anything regarding this. Same goes for Amphp's Aerys server.
Thanks!
ReactPHP is designed to allow async I/O within a single thread/process. This means that by default it will not spawn multiple processes.
This means that you can spawn any number of processes to fully utilize all your CPU cores. There are a number of different strategies to do so, so this is currently left up to you.
If you know a project (or feel like creating one) that offers a reusable API, I would love to hear about this, so make sure to let us know if this is something you're working on this 👍
I hope this helps 👍