Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2007 10:38:46 -0600
From:      "Noel Jones" <noeldude@gmail.com>
To:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   Re: Load balancing outgoing mail relay
Message-ID:  <cce506b0701170838u718c1b0fn196fcbedfb57004c@mail.gmail.com>
In-Reply-To: <000601c73a43$8683c170$6601880a@Enigma>
References:  <000601c73a43$8683c170$6601880a@Enigma>

next in thread | previous in thread | raw e-mail | index | archive | help
>
> FreeBSD 6.2 with Sendmail (initially) and now postfix.
> MS DNS with round robin (and TTL set to 0 on the records).
> Resolving with nslookup gives something like:
> smarthost.domain.tld
> 192.168.0.1, 192.168.0.2, 192.168.0.3
>
> If I kill 192.168.0.1 then it goes on the second one. But this is failover,
> and I need (approximately) load balancing.

Postfix will always internally shuffle equal-weight MX records (or
multiple A records if there is no MX).  I think sendmail does this
also.

This will not give strict round-robin use of the smarthosts, but over
thousands of messages will give an equal share to each host.

It sounds as if the host has primary/secondary MX records and you
haven't disabled MX lookups for the relayhost.  Use in main.cf
relayhost = [smarthost.domain.tld]
As documented, the brackets are required to disable MX lookups.

You may want to adjust initial_destination_concurrency_limit and
default_destination_concurrency_limit if your smarthosts will allow
more than the default 20 connections.

If sending small amounts of mail, postfix connection caching may
interfere with observed load sharing.  You may want to turn off
smtp_connection_cache_on_demand if sending small amounts of mail, but
leave it on if sending thousands of messages at a time.



-- 
Noel Jones



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