Integrated high availability service architecture _

Redundant High Availability Services Introduction

1) solve the website single point of failure

2) to reduce the pressure on the server (load balancing pressure)

High availability service to achieve the primary and standby switching principle (vrrp Virtual Router Redundancy Protocol)

 

 

 

Keepalived of works: 
between Keepalived VRRP High Availability pair is through communication, so I start with the VRRP: 
1 ) VRRP, full Vritual Redundancy Protocol, the Chinese called Virtual Router Redundancy Protocol, VRRP is to address the emergence of static in some single point of failure.
2 ) VRRP protocol is through a form of electioneering mechanism to route tasks to one of the VRRP router.
. 3 ) with the VRRP IP multicast (default multicast address ( 224.0 . 0.18 )) for communication between the high-availability pair.
4 ) When the contracting operation of the main node, the standby node then package, the standby node when the master node not receive packets when it starts to take over the master node takes over resources. The standby node can have multiple, by priority election, but generally Keepalived system maintenance work is couple.
5 ) VRRP uses encryption protocol to encrypt data, but is still recommended configuration Keepalived official authentication type and password in clear text the way. 
   Introduced over VRRP, then I re-introduce the works Keepalived services: 
   between Keepalived high-availability pairs are communicating, VRRP master and slave is determined by the electoral system, the main priority over the equipment through VRRP, therefore, it will work main priority access to all the resources and backup nodes in a wait state, when the main hang time, 
the standby node will take over the resources of the master node, and then replace the master node to provide services. between Keepalived teams, only as the primary server will always send VRRP broadcast packets, prepared to tell it alive at this time device does not seize the main, when the primary is unavailable, that is not prepared to listen to broadcast packets sent by the Lord, it will start to take over resource-related services,
Contact guarantee of the business. It took less than 1 second fastest!

 

 High availability service method: keepalived

keepalived service software:

1) LVS is born. Facilitate management LVS

2) use keepalived load balancing node health check

3) high availability load balancing standby function, NFS

Integrated high availability service deployment architecture:


    First course: lb01 / LB02 deploy load balancing server is installed on a highly available service 
    yum install - the y-keepalived 
    
    Second course: writing keepalived profiles 
    lb01 load balancing server - the main 
    vim / etc / keepalived / keepalived.conf 
    [root @ lb01 ~] # CAT / etc / keepalived / keepalived.conf 
     ! the configuration File for keepalived 
    
    global_defs {                        --- global 
       notification_email { 
         [email protected]            --- -mail address configuration (primary service appears vip switch, you need to inform the mail administrator ) 
       } 
       notification_email_from [email protected] 
       smtp_server 192.168 . 200.1         --- Mail configuration 
       smtp_connect_timeout 30 
       the router_id of the LB01                    --- define a high-availability cluster node name 
    } 
    
    vrrp_instance (family) Oldboy {         --- VRRP protocol parameters in response to the database - Example tomcat-- Example 
        State the MASTER                     - - the identity of the specified server in high-availability service (the BACKUP MASTER)
         interface eth0 --- designated vip address which appears on the card 
        virtual_router_id 66             --- family identifies 
        priority 150                     --- set the server priority, the higher the priority, more likely to be the main
        advert_int . 1                     --- master server transmits multicast packets interval 
        authentication {                 --- configure authentication service availability information
            the PASS AUTH_TYPE               for --- confirm host multicast communication in one example 
            AUTH_PASS 1234 
        } 
        virtual_ipaddress { 
            10.0 . 0.3                     --- defined vip address information 
        } 
    } 


    LB02 SLB - Preparation 
    Vim / etc / keepalived / keepalived.conf 
    [the root LB01 @ ~] # CAT / etc / keepalived / keepalived.conf 
     ! the configuration File keepalived 
    global_defs {                        --- global 
       notification_email { 
         [email protected]           
    --- -mail address configuration (primary service appears vip switch, you need to inform the mail administrator) 
       } 
       notification_email_from [email protected] 
       smtp_server 192.168 . 200.1         --- Mail Configuration 
       smtp_connect_timeout 30 
       router_id LB02                    --- define a highly available the name of the cluster node is not the same standby * * 
    } 
    
    vrrp_instance (family) Oldboy {         --- VRRP protocol parameters in response to the database - example tomcat-- example 
        state bACKUP                      - -status specified server high availability service (the mASTER the bACKUP)
                                             * standby not the same *
         interface eth0 --- designated vip address which appears on the card
        virtual_router_id 66             --- family identified 
        priority 100                     --- setting server priority, the higher priority is more likely to become the master
                                             * different standby * 
        advert_int . 1                     --- master server transmits multicast packets interval 
        authentication {                 --- high availability service authentication configuration information 
            AUTH_TYPE the PASS               --- confirm host multicast communication in one example 
            AUTH_PASS 1234
        } 
        Virtual_ipaddress { 
            10.0 . 0.3                     --- defined vip address information 
        } 
    }

    Third mileage: Test examination 
    to check the switchover: 
    PS: Note DNS name resolution, vip domain to build relationships

 

 

 

Guess you like

Origin www.cnblogs.com/zhanghongqi/p/11857507.html