I starting using http://reactphp.org/ for handle HTTP request.
I run multiple react workers that run on different ports and then use Nginx as load balancing to handle requests. Like this
upstream backend {
server 127.0.0.1:13300;
server 127.0.0.1:13301;
.....
}
All works well as expected.
The question is how to get a statistic of reactphp process status. How many processes currently on idle state (waiting for new request), how many process is work under request, etc.
Is there existing workaround?
Or idea how to handle process statistic by hand.
Example - locking write to some cache process status. When is start request process - increase number of handled processes, when finish request - increase number of idle processes.