Overview

Last updated: 2020-10-16 14:42:37

    A high availability virtual IP (HAVIP) is a private IP address assigned by VPC CIDR blocks. It is usually used in conjunction with high-availability software including Keepalived and Windows Server Failover Cluster to build a highly available primary/secondary cluster.

    Note:

    • HAVIP is currently in beta. If you are a new user outside the Shanghai and Guangzhou regions and want to try it out, please submit a beta application.
    • The primary/secondary switch in Shanghai and Guangzhou regions may take 1-2 minutes. HAVIP is now unavailable to new users in the two regions, so we recommend using Tencent Cloud CLB, TDaTa and other services to meet your requirements.
    • To guarantee the CVM high availability in a primary/secondary cluster, we recommend you to assign CVMs to different hosts using placement group. For more information about the placement group, see Placement Group.

    Features

    1. You can apply for multiple HAVIP addresses in the console for each VPC.
    2. The HAVIP binding must be done in CVM’s configuration file.
    3. HAVIP is subnet-sensitive and can only be bound by the announcement of a computer under the same subnet.

    Common Use Cases

    FAQs

    Why should I use HAVIP along with Keepalived in a VPC?

    Due to security considerations (such as ARP spoofing), some public cloud vendors do not support binding a private IP to CVM through ARP announcement. If you directly specify an ordinary private IP as virtual IP in the “Keepalived.conf” file, Keepalived cannot update the mapping between the virtual IP and MAC address when switching virtual IP from the primary server to the secondary server. In this case, you have to call an API to switch the IP.
    Using Keepalived configuration as an example, the IP configurations are as follows:

    vrrp_instance VI_1 {
        state BACKUP           #Secondary device
        interface eth0          #ENI name 
        virtual_router_id 51
        nopreempt                   #Non-preemptive mode
        #preempt_delay 10
        priority 80
        advert_int 1
        authentication {
            auth_type PASS
            auth_pass 1111
        }
        unicast_src_ip 172.17.16.7   #Private IP of the local device
        unicast_peer {
            172.17.16.13           #IP address of the peer device, for example: 10.0.0.1
        }
    
        virtual_ipaddress {
    
            172.17.16.3  #Enter the HAVIP address you have applied for from the console.
    
        }
    
        garp_master_delay 1
        garp_master_refresh 5
    
        track_interface {
            eth0              
        }
    
        track_script {
            checkhaproxy
        }
    }

    If there is no HAVIP, the following section of the configuration file will be invalid.

    virtual_ipaddress {
       172.17.16.3  #Enter the HAVIP address you have applied for from the console.
    }

    Subsequent Operations

    • For more information about the use limits of HAVIP, see Limits.
    • For more information about the operation guide of HAVIP, see Managing HAVIP.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help