04-05-2020
A small addon for active active - so traffic flows thru both haproxys.
You need 2 VIP address for keepalived, on one node first VIP is master, on another second VIP is master.
Both will be on one node in case of node failure.
Then, you add third entry on your DNS system (mymail.example.com) -> pointing to those two VIP addresses.
This is the record you 'attack' from outside with your clients.
Since both VIP IP addresses are always active, clients will be always be able to connect to both when DNS is queried.
Client attempts to make a connection to mymail.example.com ( one VIP is returned in RR fashion from the pool of two ) --> HAPROXY --> your mail server.
Setup sticky session in haproxy and make it listen on 0.0.0.0
Be sure to allow VRRP traffic between those two LB.
In case of failure, everything hicks wrote stands, clients connected to failed VIP will notice a short failover and reconnect to second node.
But only roughly 50% of those, since half of those went to another VIP using same DNS record.
Hope that helps
Regards
Peasant.
6 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
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
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
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
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
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
#!/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
LEARN ABOUT DEBIAN
smtpdcheck
smtpdcheck(1) Mail Avenger 0.8.3 smtpdcheck(1)
NAME
smtpdcheck - check SMTP servers
SYNOPSIS
smtpdcheck [--stop {ip-addr|name}] [--timeout seconds]
[prio:]server [[prio:]server]
DESCRIPTION
smtpdcheck checks to see if SMTP servers are available. The intent is for use on secondary mail servers, which have no reason to accept
mail when the primary server is available.
The argument consists of a list of server names, each of which may optionally be prefixed by a numeric MX priority and a colon. (This is
exactly the format for MX records returned by the avenger dns command.) smtpdcheck will attempt to connect to each server in succession.
If one of the servers specified on the command line is available, smtpdcheck will print its name to standard output and exit with status 1.
If smtpdcheck cannot connect to any of the servers, it will exit with status 0. If a system error occurs, smtpdcheck will exit with status
2.
OPTIONS
--stop {ip-addr|name}
Tells smtpdcheck to stop before checking a server with IP address ip-addr or hostname name. If such a host is encountered in the list
of servers and prio is specified, then smtpdcheck will consider it acceptable for other servers with the same priority to be available,
even if those servers were first in the list. In other words, given the following arguments:
smtpdcheck --stop s2.domain.com
10:s1.domain.com 10:s2.domain.com
20:s3.domain.com
This command will always succeed, regardless of whether "s1.domain.com" is up, because "s2.domain.com" has the same priority. On the
other hand, the following command will fail and output "s1.domain.com" if "s1.domain.com" is up:
smtpdcheck --stop s2.domain.com
10:s1.domain.com 20:s2.domain.com
30:s3.domain.com
If a gethostbyname lookup for the argument name fails, smtpdcheck will exit immediately with status 2.
--timeout {seconds]
By default, smtpdcheck spends 10 seconds probing each server. This includes the time to do a DNS lookup, to establish a TCP connection
to port 25 of the server, and to read the "220" SMTP code from the server's SMTP greeting message. To use a different value, specify
it with the --timeout option. The value 0 disables the timeout completely, which is dangerous since smtpdcheck might then end up
waiting forever to read the "220" string.
EXAMPLES
To refuse to relay mail at a secondary MX server when the primary server is not down, you might place the following in
/etc/avenger/secondary (assuming MxLocalRcpt is 1):
dns RECIP_MXES mx "$RECIPIENT_HOST"
setvars
server=`smtpdcheck --stop $MYIP $RECIP_MXES`
test -n "$server" && defer "Please use server $server"
SEE ALSO
avenger(1) dbutil(1) asmtpd.conf(5),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
smtpdcheck could achieve much lower latency by probing all the servers simultaneously. It should also include some kind of caching, to
avoid repeatedly trying to contact an unavailable server. Finally, hosts with multiple IP addresses could be handled more cleanly, though
what smtpdcheck does should probably work in most cases.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 smtpdcheck(1)