Displaying 1 to 2 from 2 results

nginx-websocket-module - make nginx as websocket server

  •    C

Nginx use the multiprocess model. The worker process has no idea of eatch other. When there is a incoming http request, the request has been processed by one worker. This model is simple yet efficient. It works well for nginx as a proxy server. However, if you want nginx work as an websocket server, we would face an intractable problem. Suppose we have two workers, A and B. When an websocket client comes, it will be processed by A or B. Let's suppose it by A. And nginx then send some id info the the client. If we want send somethig to the client, we need make a request, as well. However, our push request maybe processed by another worker B. The worker B has no idea about the client. It failed.