Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Web Server Apache Loadbalancing, Cluster, Failover (http://quantrinet.com/forum/forumdisplay.php?f=336)
-   -   Cách loadbancing làm việc và Loadbalacing and HA với Nginx và Keepalive (http://quantrinet.com/forum/showthread.php?t=9863)

hoctinhoc 07-09-2015 10:04 AM

Cách loadbancing làm việc và Loadbalacing and HA với Nginx và Keepalive
 
Loadbalacing and HA với Nginx và Keepalive

1. Cách loadbalancing làm việc

http://gcharriere.com/blog/wp-conten...10r010t010.jpg


2. High Availability Support Based on keepalived

https://d3vebe3jugtos1.cloudfront.ne...y_aws_arch.png

NGINX Plus Release 6 (R6) and later includes a solution for fast and easy configuration of NGINX Plus in an active-passive high-availability (HA) setup. It is based on keepalived.
The keepalived open source project project provides the keepalive daemon for Linux servers, an implementation of the Virtual Router Redundancy Protocol (VRRP) to manage virtual routers (virtual IP addresses), and a health check facility to determine whether a service (for example, a web server, PHP back end, or database server) is up and operational. If a service on a node fails the configured number of health checks, keepalived reassigns the virtual IP address from the master (active) node to the backup (passive) node.
VRRP ensures that there is a master node at all times. The backup node listens for VRRP advertisement packets from the master node. If it does not receive an advertisement packet for a period longer than three times the configured advertisement interval, the backup node takes over as master and assigns the configured virtual IP addresses to itself.
Configuring High Availability

Run the nginx-ha-setup script (available in the nginx-ha-keepalived package, which must be installed in addition to the base NGINX Plus package) on both nodes as the root user. The script configures a high-availability NGINX Plus environment with an active-passive pair of nodes acting as master and backup. It prompts for the following data:
  • IP address of the local and remote nodes (one of which will be configured as a master, the other as a backup)
  • One free IP address to be used as the cluster endpoint’s (floating) virtual IP address

Read more: https://www.nginx.com/resources/admin-guide/nginx-ha-keepalived/


:battay:


Bây giờ là 01:01 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.