Sponsored Content
Top Forums UNIX for Advanced & Expert Users Ha mailserver, is possible active/active with "constant" connection? Post 303045629 by Peasant on Saturday 4th of April 2020 02:10:25 PM
Old 04-04-2020
Why address on lo interface ?
Getting address on that interface is only used in case of DSR (direct server return) balancing, which haproxy does not do.
Haproxy is L3 and above, while DSR is L2.

Can you remove the lo:0 address entry from ALL servers (LB and mail servers) ?
In your case, VIP address is only on master haproxy node (one of two) with /24 mask (not on lo, and keepalived is handing that.

Also, configure the keepalived in the following manner, then retest :

Code:
vrrp_script check_haproxy {
script "/usr/bin/killall -0 haproxy" # be sure to check the availability of killall program or configure some other check, killall is cheap.
interval 2
weight 2
}
vrrp_instance VI_1 {
        state MASTER #
        interface <your network interface for VIP address>
        virtual_router_id 51
        priority 101
# VRRP VIP
virtual_ipaddress {
          10.2.0.4
}
authentication {
        auth_type PASS
        auth_pass <some password>
}

track_script {
        check_haproxy
}
}

Haproxy keeps monitoring accessibility of (mail) backend servers, and keepalived keeps monitoring if haproxy is up.
If that is what you need and i understood correctly.

Of course, you can add additional conditions to keepalived to execute failover of VIP address, after you confirm everything is working.

Hope that helps
Regards
Peasant.
 

6 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Windows Active Network Connection Override

Hi All, I use two Network Connections at work: Wireless and LAN. Wireless network has no limitations, but LAN internet has a web filter. I start a download using my Wireless conn. (At this point, LAN is disabled) But when I activate my LAN connection my download stops immediately. LAN... (4 Replies)
Discussion started by: kalavkalav
4 Replies

2. AIX

Question about HACMP for active-active mode

Hi all, I am new to HACMP. So sorry for the newie question. But I did search the forum and it seems that no one asks this before. So if a 2-node cluster runs in active-active mode (and the same application), what is the benefit of using HACMP ? If it runs in active-stanby, it is easy to... (9 Replies)
Discussion started by: qiulang
9 Replies

3. Solaris

Link based Active Active IPMP

Hi, I need to configure 4 ip address (same subnet and mask) in one ipmp group (two interfaces) in an active active formation (link based). Can some one provide the steps or a tutorial link. Thanks (2 Replies)
Discussion started by: Mack1982
2 Replies

4. Shell Programming and Scripting

Extract text between two specified "constant" texts using awk

Hi All, From the title you may know that this question has been asked several times and I have done lot of Googling on this. I have a Wikipedia dump file in XML format. All the contents are in one XML file i.e. all different topics have been put in one XML file. Now I need to separate them and... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Linux

active mode ftp connection from linux

Hi, We have one java client which connects to a windows server through ftp in active mode and gets files. When we run this client on hp-ux, it is able to transfer 100k files. But when we run the same client on Linux server it is able to transfer only 200 files at max and it is hanging there... (1 Reply)
Discussion started by: urspradeep330
1 Replies

6. Shell Programming and Scripting

How do I calculate total number of active and non active hosts?

#!/bin/bash for digit in $(seq 1 10) do if ping -c1 -w2 192.168.1.$digit &> /dev/null then echo "192.168.1.$digit is UP" else echo "192.168.1.$digit is DOWN" fi done (3 Replies)
Discussion started by: fusetrips
3 Replies
HATOP(1)						      General Commands Manual							  HATOP(1)

NAME
HATop - interactive ncurses client for haproxy SYNOPSIS
hatop -s SOCKET [OPTIONS] DESCRIPTION
HATop is an interactive ncurses client and real-time monitoring, statistics displaying tool for the HAProxy TCP/HTTP load balancer. HATop's appearance is similar to top(1). It supports various modes for detailed statistics of all configured proxies and services in near realtime. In addition, it features an interactive CLI for the haproxy unix socket. This allows administrators to control the given haproxy instance (change server weight, put servers into maintenance mode, ...) directly out of hatop (using keybinds or the CLI) and moni- tor the results immediately. HATop uses a unix domain socket to communicate with HAProxy. This can be configured in the HAProxy configuration using the "stats socket" option. To enable all of HATop's features the "level" parameter of this option should be set to "admin". OPTIONS
--version show version number and exit -h, --help show help message and exit -s SOCKET, --unix-socket=SOCKET path to the haproxy stats socket -i INTERVAL, --update-interval=INTERVAL update interval in seconds (1-30, default: 3) -m MODE, --mode=MODE start in specific mode (1-5, default: 1) -n, --read-only disable the cli and query for stats only The following filter options may be given multiple times: -f FILTER, --filter=FILTER stat filter in format "<iid> <type> <sid>" -p PROXY, --proxy=PROXY proxy filter in format "<pxname>" KEYBINDS
Hh? Display help screen Qq Quit TAB Cycle mode forwards S-TAB Cycle mode backwards ESC-n Switch to mode n, where n is the numeric mode id ESC Jump to previous mode ENTER Display hotkey menu for selected service SPACE Copy and paste selected service identifier to the CLI UP / DOWN / PGUP / PGDOWN / HOME / END Scroll the stat views to select a given service HOTKEYS
F4 Restore initial server weight F5 Decrease server weight: - 10 F6 Decrease server weight: - 1 F7 Increase server weight: + 1 F8 Increase server weight: + 10 F9 Enable server (return from maintenance mode) F10 Disable server (put into maintenance mode) SEE ALSO
haproxy(1) A much better documentation can be found online: http://feurix.org/projects/hatop/ AUTHOR
HATop and this man page was written by John Feuerstein. 19 August 2010 HATOP(1)
All times are GMT -4. The time now is 12:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy