: This article mainly introduces the comparison between Nginx and Nginx +. For more information about PHP tutorials, see. Comparison between Nginx and Nginx + (I)
Author: chszs, which cannot be reproduced without the consent of the blogger. Licensed reprinting requires the author and blog home page: http://blog.csdn.net/chszs
I. INTRODUCTION to Nginx +
Nginx and Nginx + are both official Nginx products. The difference between the two is that Nginx is an open-source community version, while Nginx + is a paid enterprise-level version for Nginx.
Nginx + charges are as follows: For single-instance deployment, the annual fee is USD 1900. for multi-instance deployment, you need to contact the official Nginx team to negotiate the quotation.
Nginx + also provides a 30-day free trial, and you still need to pay after expiration.
Nginx + is only available in binary release, and does not provide source code.
Nginx + adds enterprise-level features based on the Nginx Open-source community edition, such:
- Full-featured HTTP and TCP load balancing
- High-Performance reverse proxy
- Cache and unmount static and dynamic content
- Adaptive Streaming media Godfather audio and video content to any device
- Application-sensitive health check and high availability
- Provides Advanced activity monitoring through dashboards or APIs.
- Advanced monitoring and management: provides developer-friendly tools to manage and implement real-time changes
- Session persistence
- Consulting Service
II. Comparison between Nginx and Nginx +
Nginx + has some features not available in the Nginx Community Edition, including:
1. advanced HTTP and TCP load balancing
In terms of the load balancing algorithm, Nginx + adds the "Least Time" (Least Time) load balancing algorithm. The "minimum time" algorithm distributes requests to server nodes with the fastest response time and the least active connections.
2. session persistence
HTTP is a stateless protocol. Therefore, many applications are usually stored locally and cannot share the status in the server load balancer environment. Because the client state sharing between server nodes means that the speed is slow and implementation is troublesome. Therefore, the most common practice is to balance the load of the same terminal to the same node, you do not need to share or synchronize the status information between nodes.
Nginx + can track user sessions and distribute end users' requests to the correct upstream server node. Nginx + provides three methods to identify user sessions:
- Insert tracking information to request data
Use the sticky cookie command:
upstream backend { server webserver1; server webserver2; sticky cookie srv_id expires=1h domain=.example.com path=/;}
- Detect requests in sessions
Use the sticky learn command:
upstream backend { server webserver1; server webserver2; sticky learn create=$upstream_cookie_sessionid lookup=$cookie_sessionid z timeout=1h;}
- Trace specific data in the request
Use the sticky route command:
upstream backend { server webserver1 route=a; server webserver2 route=b; # $var1 and $var2 are run-time variables, calculated for each request sticky route $var1 $var2;}
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above section describes the comparison between Nginx and Nginx +, including some content, and hopes to help those who are interested in PHP tutorials.