I am working on a full version of js, HTML5 canvas and want it to be "real time". Based on my research, I found out that node.js is an exciting perspective, so I configured it on my ubuntu 12 web server using socket.io, express, etc.
I am a programmer, but just a rookie in the world of web servers, so I ask you for help. I got confused in the general model of the system and want to clarify how it works. I may have read too many articles in a short time.
First of all: I am running nginx 1.2.x on my web server. As I know, nginx handles rquests, it is dedicated to port 80 (for me) and serves HTTP requests (also using php-fpm to serve php). Again, I have a successfully launched nodejs server on port 8080. I want to connect via websocket (due to its nature and protocol), since nginx does not support websocket, but I am confused about what is happening.
If I go to http // mydomain.tld: 8080, will this go through the node server and save nginx? In this case, the connection can be made through websocket and not be discarded on xhr or anything else (I do not want it because of scalability), right?
Then what should I do to have the same effect in http // mydomain.tld / game /? Just a proxy request in nginx.conf to the node server? How:
try_files $uri @nodejs;
location @nodejs
{
proxy_pass 127.0.0.1:8080;
break;
}
: qaru.site/questions/484835/...
-, nginx? , , php- socket.io. , 80 websocket. ?
http://www.exratione.com/2012/07/proxying-websocket-traffic-for-nodejs-the-present-state-of-play/ , HAProxy nginx 1.3, ?
, , . , | | | .
PS: .
Ps2: : red5 (- java) + flash, .