Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2001 08:50:03 -0500
From:      Bob Martin <bob@buckhorn.net>
To:        freebsd-isp@freebsd.org
Subject:   Re: Mail Server - Round Robin Load Distribution
Message-ID:  <3BA35C8B.8ACC74E6@buckhorn.net>
References:  <20010915080113.985.qmail@web20101.mail.yahoo.com> <20010915222844.A6415@plug.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
Multiple A records for a single MX, as well as CNAMES for the MX record
won't do what you want, as clients and servers (DNS) tend to cache
addresses. Since your DNS server will always pass along the first A
record, or the first CNAME, no balancing will occure. The priority flag
for the MX record was designed for just this reason. (Man named.conf for
details)
What you need is this:

domain.com.	IN	MX	10	mail1
domain.com.	IN	MX	10	mail2
mail1		IN	A		1.2.3.4
mail2		IN	A		1.2.3.5

Andrew Reid wrote:
> 
> On Sat, Sep 15, 2001 at 10:01:13AM +0200, Fabrizio Ravazzini wrote:
> 
> > I want to make this cluster using DNS-RoundRobin.
> > Reading the book DNS&BIND (O'Reilly) page 274, if I
> > insert two A-Records with two CNAME I can make
> > the round Robin, but this for ftp,http or whatever
> > server,but I think NOT Mail Servers.
> 
> Hrm, your interpretation seems a little weird. Basically, you'd do
> something like this to achieve "load balancing" through DNS:
> 
> domain.com.         IN         MX 10 mail
> mail                IN         A     1.2.3.4
> mail                IN         A     1.2.3.5
> 
> Basically, what would happen in the case of an email being sent to
> joe@domain.com is:
> 
>   o ) Remote SMTP server queries DNS server for domain.com to find the
>       MX host.
> 
>   o ) Remote SMTP server queries DNS server for domain.com to find the
>       IP Address for mail.domain.com.
> 
>   o ) DNS server for domain.com responds to remote SMTP server with
>       either 1.2.3.4 or 1.2.3.5, based on the method of "load
>       distribution" employed by BIND.
> 
> > So,the question is, can I still have load distribution
> > with a mail server?
> 
> Most certainly. Remember, SMTP is just another port on your
> server. Round Robin DNS is just one form of load balancing. Other
> methods might include using software such as balance, or another piece
> of software by the makers of vmailmgr. Then again, you could shell out
> many thousands of dollars and purchase a commercial load balancing
> switch.
> 
> > Suppose that the service domain is mail.com, so you
> > can send mail for example to john@mail.com
> > and the two machine of the cluster are:
> > one.mail.com ( Ip: A.B.C.D )
> > two.mail.com ( Ip: X.Y.Z.K )
> 
> [ ... ]
> 
> > In the second case I don't have any Load Distribution,
> > all the traffic goes to the "one.mail.com"
> > till it goes down and that's not what I want.
> 
> Perhaps you need something like balance which includes the ability to
> cater for failures. That'll take care of the load balancing and the
> redundancy in the one operation. Bear in mind that you'd then need a
> machine which you could use for the purpose of running balance on. It
> also becomes a single point of failure.
> 
>    - andrew
> 
> --
> void signature () {
>         cout << "Andrew Reid -- andrew.reid@plug.cx" << endl ;
>         cout << "Cell: +61 401 946 813" << endl;
>         cout << "Quidquid latine dictum sit, altum viditur" << endl;
> }
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BA35C8B.8ACC74E6>