Nginx reverse proxy Websocket

Source: Internet
Author: User
Tags nginx reverse proxy
From scratch, the nodejs series will introduce how to use Javascript as a server script and develop it through the Nodejs framework web. The Nodejs framework is based on V8 and is currently the fastest Javascript Engine. Chrome is based on V8, and 20-30 Web pages can be opened smoothly at the same time. Nodejs standard web development framework Express can help us

From scratch, the nodejs series will introduce how to use Javascript as a server script and develop it through the Nodejs framework web. The Nodejs framework is based on V8 and is currently the fastest Javascript Engine. Chrome is based on V8, and 20-30 Web pages can be opened smoothly at the same time. Nodejs standard web development framework Express can help us

From scratch, the nodejs series will introduce how to use Javascript as a server script and develop it through the Nodejs framework web. The Nodejs framework is based on V8 and is currently the fastest Javascript Engine. Chrome is based on V8, and 20-30 Web pages can be opened smoothly at the same time. Nodejs standard web development framework Express can help us quickly establish a web site, which is more efficient than PHP development and has a lower learning curve. It is very suitable for small websites and personalized websites. Our own Geek website !! About author Zhang Dan (Conan), programmer Java, R, PHP, Javascript weibo: @ Conan_Z blog :? http://blog.fens.me Email: bsspirit@gmail.com reproduced please indicate the source: http://blog.fens.me /Nodejs-websocket-nginx/preface using Nginx for reverse proxy and load balancing for websites is a widely used Web technology that not only ensures the concealment of backend servers, it can also improve website conditions, flexible deployment, and cost-effective load balancing with source software. However, let's talk about how to use Nginx to implement reverse proxy and load balancing for Websocket servers. This is also my first attempt, so I will only implement the function and optimize it later. Directory reverse proxy and Server Load balancer create Node-based websocket server create websocket client use Nginx implement reverse proxy use Nginx implement Load Balancing for multiple websocket servers 1. the Reverse Proxy and Server Load balancer Reverse Proxy are used to receive connection requests from the internet from the Proxy server and then forward the requests to the server on the internal network, return the result obtained from the server to the Client Requesting connection from the internet. The proxy server is displayed as a server. Load Balancing is built on the existing network structure, it provides a cheap, effective, and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability. 2. create a Node-based websocket server system environment: win7 64bit npm 1.2.19 node v0.10.5 bower 1.1.2 nginx 1.5.11 redis 2.4.6 create a Node-based websocket server to create a new project D: \ workspace \ javascript> mkdir nginx-websocket & cd nginx-websocket D: \ workspace \ javascript \ nginx-websocket> npm install socket. io socket.io@0.9.16 node_modules \ socket. io ──...
Read more →

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.