Http server based on React, potentially consumes less memory and works much faster that mod-php5 and php-fpm (and even pure HHVM too)

Http server is running in background and listen for incoming connections.

Server can be runned as single instance:

php components/modules/Http_server/supervisor.php 'php components/modules/Http_server/run_server.php -p 8080'
php is used as example, hhvm can be used instead as well
8080 is port, you can replace it by any port you need

It is also possible to run the pool of servers and use load balancer to distribute requests between separate instances in pool:

php components/modules/Http_server/run_pool.php -p 8001-8010
In this example 10 servers will be started on ports from 8001 to 8010 (supervisor will be included)

To see more details about execution parameters run server or pull without arguments and you'll see description of available options:

Nginx config

Nginx is recommended as web server here, since this Http server doesn't handle (and, likely, shouldn't) static content.

Take regular Nginx config as reference, and replace location ~ ^/index\.php { block by one of following.

For single Http server instance:
	
location ~ ^/index\.php {
	proxy_pass			http://127.0.0.1:8080$request_uri;
	proxy_set_header	X-Forwarded-Host	$server_name;
	proxy_set_header	X-Forwarded-Port	$server_port;
	proxy_set_header	X-Forwarded-Proto	$scheme;
	proxy_set_header	X-Forwarded-For		$remote_addr;
}
	
For pool of Http server instances:
	
location ~ ^/index\.php {
	proxy_pass			http://http_servers_pool$request_uri;
	proxy_set_header	X-Forwarded-Host	$server_name;
	proxy_set_header	X-Forwarded-Port	$server_port;
	proxy_set_header	X-Forwarded-Proto	$scheme;
	proxy_set_header	X-Forwarded-For		$remote_addr;
}
	
Also in case of pool you have to add pool itself right before server { block:
	
upstream http_servers_pool  {
    server 127.0.0.1:8001;
    server 127.0.0.1:8002;
    server 127.0.0.1:8003;
    server 127.0.0.1:8004;
    server 127.0.0.1:8005;
    server 127.0.0.1:8006;
    server 127.0.0.1:8007;
    server 127.0.0.1:8008;
    server 127.0.0.1:8009;
    server 127.0.0.1:8010;
}	

Limitations

If you are running serve in asynchronous mode, actual timezone that is setted may not correspond to current user due to PHP limitations, so if users might have different timezones it is recommended to account that explicitly. Except timezone nothing should differ from regular system operation. File uploads are not currently supported.