Disaster recovery is achieved by switching the load balancer + domain - (9) GSLB typical products -F5 Profile

========================================
difference between the F5 and Ngnix & Application
Taken: https : //www.cnblogs.com/Lonelydancer/p/6219567.html
================================== ======
after I recently when a group responsible for the site, but uses Nginx and F5, as shown, F5 load balancer to distribute the web server as a first line treatment outside the request of the "wall", the request , Nginx web server on the further processing, static content directly access local portal, dynamic data through the reverse proxy to point within the network service.

In fact, Nginx and F5 both of which can be used as the site load balancing, and that both what difference does it? Talking about the author in this case the F5 Nginx with some differences.

Currently many sites or applications in data beginning of the design will be a high concurrent request load balancing, not bad money Tyrant users usually buy directly F5 hardware load balancer as the reason Needless to say, the powerful, not only contains the load balancing also includes an application switching, the session exchange, status monitoring, intelligent network address translation, the general persistence, in response to error processing, the IPv6 gateway, advanced routing, intelligent port mirroring, the SSL acceleration, intelligent HTTP compression, TCP optimization, L7 rate shaping, buffer content, content conversion, connected acceleration, caching, Cookie encryption, selective content encryption, application attack filtering, denial of service (DoS) attacks and SYN Flood protection, firewall filtering and other functions, it is not very strong? Of course, the price is people very "heart." And some of the budget is not high, the website is for the early development of, Nginx this soft load is well positioned to meet the needs of its data distribution, let's take a look at how Nginx load balancing is to meet our needs:


First, what is Nginx:

Nginx: high-performance HTTP server and reverse proxy, as supports IMAP / POP3 / SMTP proxy server. Many sites currently use its soft HTTP load balancer. Efficient performance, good stability, rich feature set, simple configuration files and low system resource consumption is gradually being favored by large Internet companies. For example, Tencent, Taobao, Sina and other large portals and commercial sites use Nginx HTTP data shunt site.

Two, Nginx features:

1, work on the seven layers of the network, you can do some diversion policy for http applications, such as for the domain name, the directory structure;

2, Nginx dependent on the network is relatively small.

3, Nginx is relatively simple to install and configure, test more convenient.

4, can bear high loads and pressure stable, generally support more than 10,000 concurrent times.

5, Nginx be inside the server through the port failure is detected, such as web server processing according to the status code returned, to time out, and will return an error to resubmit the request to another node, but which do not support the drawback is detected url .

6, Nginx request for asynchronous processing can help reduce the load on the server node.

7, Nginx supports http and Email.

Third, the principle

Nginx technology uses a reverse proxy, the proxy server to accept connection requests on the internet, and then forward the request to the server on the internal network, and the results returned from the server to the client requesting the connection to the internet, in which case external proxy server on the performance of a server. Reverse proxy load balancing on the internet connection is to request from the reverse proxy forwards dynamic manner to multiple servers on the internal network for processing, so as to achieve load balancing purposes.

Specifically how to run it? In fact, when Nginx start its work process is initiated by the profile of its main processing process reads the configuration file, port binding privileged operations, then create a sub-group process, these were requested by the child process treatment, while the hard disk cache loader loaded into memory buffer, then quit to ensure that resource consumption has maintained a low state.

As can be seen, in fact, it created the child process is responsible for all the work, handle network connections, disk read and write operations, as well as upstream server communication.

As shown in Figure: masert process is the main thread, worker process definition, "I am the specific work of the matter", the author of the screenshot process is still relatively small, because it is your own server, there is not much service, the actual business there may be dozens of worker process, it was quite spectacular.

 

Nginx recommended configuration is a working process corresponds to a CPU core, ensure efficient use of hardware resources.

Once NGINX up service, just busy work processes, each process working non-blocking way to handle multiple connections, reduce the number of context switches.

Each worker process is single-threaded and run independently, responsible for obtaining new connections and processed. Between processes communicate through shared memory, such as cache data, session persistence data (ession persistence data), and other shared resources.

Four, F5 load balancing function

In fact, to see the principles and features of Nginx, is not that F5 has no need of? Of course, not, F5 load balancing, after all, the old-timers, has been to a powerful, stable performance known, in fact, a lot of soft load function can not be done.

F5 BIG-IP as an HTTP load balancer main functions:

1, F5 BIG-IP offers 12 flexible algorithms will be evenly distributed all traffic to the servers, and the face of the user, but a virtual server.

2, F5 BIG-IP can confirm whether the application returns the data corresponding to the request. If the latter F5 BIG-IP service stops a server occurs, crashes and other failures, F5 and checks out the server identified as down, so that the user does not request to access the server station failure. In this way, as long as the other normal servers, user access will not be affected. Once the repair downtime, F5 BIG-IP application will automatically check to ensure respond properly to the client's request and resume the transfer to the server.

3, F5 BIG-IP sessions with dynamic Session of the hold function, F5 is also the author of the site will use the user's IP and Session F5 conducted by binding to make it consistent Session.

4, F5 BIG-IP iRules functionality of HTTP content filtering can be done, depending on the domain name, URL, the access request to a different server.

Fifth, the contrast between

F5, hardware

Benefits: direct through intelligent switches, processing power, and has nothing to do with the system, load performance, more suitable for a lot of equipment, a large number of visits, simple application.

Disadvantages: high cost (3W USD + Reference: http: //top.zol.com.cn/compositor/517/manu_32315.html), in addition to the high cost of equipment and the configuration of redundant, hard to imagine that behind the server to do a cluster, but the most critical load balancing device is a single point of configuration, can not effectively control server and application state.

Hardware load balancers, generally regardless of the actual state of the application system, but only to determine from the network layer, so sometimes the system capacity has to die, but the network may also be could react (this is typical, such as the application server behind memory already take up a lot, but not yet complete, if the network traffic is not just at the network layer can not be reflected)

Nginx, soft load

Advantages: application of load balancing based on the system, it is possible to better distribute the load according to the status of the system and application. This is important for complex applications, cost-effective, in fact, if several servers with hardware products like F5 bit wasteful, but is much more cost-effective software necessary because the server can also run applications, and so do the clusters .

Disadvantages: load capacity affected the performance of the server itself, the better the performance, the greater the load capacity.

Epilogue

In fact, as I still comes first, if not bad money, can directly on F5, while accompanied by Nginx as load balancing and web container, handling a large amount of data users concurrent no problem, if the budget is not enough, in fact, is also Nginx to meet the needs of most users, of course, can not superstitious load balancing, rationality, the program, SQL and other places for our IT worker is involved in the business logic of data processing, whether architecture or code that also, or model, its importance is always higher than the middleware, this must have every ITer resonance.


六、F5产品选择
F5 Global Traffic Manager(以下简称 F5 GTM),F5 GTM负载均衡器是全球领先的负载均衡技术产品,包括完整的智能DNS功能,可充分利用GTM各种算法,LTM、GTM的协同实现包括链路可用性探测、链路性能探测、Server性能探测,静动态算法均可使用,从而可充分合理的分配每条链路、数据中心的使用,为用户对数据中心的访问提供最优的体验 ,提升应用的可靠性和可用性。

F5 LTM。站点内的负载均衡使用SLB实现,本方案中SLB使用F5 LTM部署,支持http/https、FTP、Diameter、SMPP、SIP协议等大量应用层协议的负载均衡健康检测。SLB对外提供的业务接口(包括IP地址和端口),接收来自客户端的业务请求。

Guess you like

Origin www.cnblogs.com/yickel/p/10962104.html