Wietse Venema:
> A possible solution for load balancing is to introduce a new map
> type that makes random selection.
>
> randmap:/file/name
>
> The file contains a list of reponses, one response per line,
> ignoring leading whistespace, trailing whitespace, and empty
> lines. Each map query returns a randomly-selected response.
>
> randmap:!one!two!three
>
> Split the text after ":" on the first character, producing a
> list of responses (one, two, three). Each map query returns a
> randomly-selected response.
>
> That should be enough to load-balance deliveries over mail delivery
> transports.
>
> The following example will deliver local mail locally and load-balance
> non-local mail over smtp0: and smtp1:.
>
> /etc/postfix/main.cf:
> transport_maps = hash:/etc/postfix/transport, randmap:!smtp0:!smtp1:
Here are some more simple building blocks to encourage clean
solutions.
- Using similar syntax as the randmap feature, a roundmap feature
that implements round-robin selection instead of random selection.
- An smtp_bind_addres_maps feature that searches a map by destination
IP address. This could be combined with randmap or roundmap selection.
- A randmap(8) or roundmap(8) pseudo-delivery agent that selects a
real delivery agent (or transport[:nexthop]?) from a list, with a
user interface similar to randmap/roundmap lookup tables. This
can, for example, load-balance over arbitrary SMTP client settings.
- An option to disable or limit the use of the one-element cache
in the Postfix address resolver client.
I'm getting tired of questions about relayhost load balancing or
source IP address diffusion.
Wietse