1.
You start the server with --workers > 0 (depending on your hardware), so you have that many threads on port 8069. You will also have a couple of cron threads on 8069 (configurable with --max-cron-threads) and one gevent thread on port 8072 (configurable with --longpolling-port). You have to setup a reverse proxy (apache2 or nginx will do the job), and map your 8069 port to the external 80. Here is the important part: you also have to reverse proxy your 8072 port to the external 80, but only for location /longpolling (in nginx this is done with a second location). That way you have your users using the workers normally and the gevent thread only for getting the bus messages. I will post soon a complete installation and configuration guide for v8.0 with all the details usually missing in available guides.
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://0.0.0.0:8088;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /longpolling/ {
proxy_pass http://localhost:8077/longpolling/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
浙公网安备 33010602011771号