Utilizing multiple MX records for load balancing incoming email offers a basic level of distribution but presents several challenges. The RFC specifies a round-robin approach for MX records with equal priority, however, sender-side caching, varied ISP behaviors, and uneven respect for multiple MX records by mail servers can lead to unpredictable and uneven load distribution. While suitable for small organizations as a free and readily available solution, experts and documentation recommend dedicated load balancers with health checks for more robust environments. Alternatives include using a single MX record with multiple A records or employing geo-location load balancing. Importantly, using MX records with different priorities configures failover, not load balancing. Security implications, particularly when using multiple A records, must also be considered.
18 marketer opinions
Using multiple MX records to load balance incoming email involves trade-offs. While it's a valid strategy, especially for smaller organizations, DNS-based load balancing has limitations. The RFC specifies that servers should attempt connections in a round-robin fashion, but sender-side caching and varying ISP behaviors can make this unpredictable. Some mail servers might not respect multiple MX records equally, leading to uneven distribution. For robust environments, experts recommend using dedicated load balancers with health checks. Combining MX records with load balancers or using multiple A records pointing to different servers are also options. Furthermore, using MX records with different priorities act as failovers if the higher priority servers are unavailable. Consideration should also be given to security implications with multiple A records. Geo-location load balancing can also improve email delivery and performance.
Marketer view
Marketer from Email Geeks clarifies that DNS does allow multiple A records for the same host, and provides <http://www.google.com|www.google.com> as an example.
27 Nov 2022 - Email Geeks
Marketer view
Email marketer from cPanel Forum warns that not all mail servers respect multiple MX records equally, and some might always try the first one they resolve. This can lead to uneven load distribution.
24 Nov 2024 - cPanel Forum
2 expert opinions
Experts indicate that while MX records can facilitate basic load balancing, DNS-based methods possess limitations, notably caching issues and the absence of real-time server health monitoring. For robust environments, dedicated load balancers are preferred. MX records can also be configured for automatic failover in the event of server failures, providing redundancy but not load balancing.
Expert view
Expert from Word to the Wise explains how to configure your domains and MX records to automatically reroute mail in a failure. This article focuses on how to make your MX records failover, not for load balancing.
9 Mar 2023 - Word to the Wise
Expert view
Expert from Spam Resource explains that while MX records can be used for basic load balancing, DNS-based methods have limitations, particularly with caching. Load distribution might not be even, and it doesn't account for server health in real-time. More sophisticated solutions involving dedicated load balancers are usually preferred for robust environments.
8 Jul 2024 - Spam Resource
5 technical articles
Technical documentation from Microsoft, DigitalOcean, RFC Editor, Exim Wiki, and PowerDNS collectively explains that incoming email can be load balanced using multiple MX records. MX records with the lowest preference number (highest priority) are attempted first. When multiple MX records share the same priority, SMTP clients and MTAs like Exim and PowerDNS should attempt connections in a random or arbitrary order to distribute the load. This behavior is outlined in RFC 5321.
Technical article
Documentation from Microsoft Learn explains that MX records with the lowest preference number (highest priority) are tried first. If multiple MX records have the same preference number, they are tried in an arbitrary order.
4 Feb 2023 - Microsoft Learn
Technical article
Documentation from Exim Wiki explains that Exim, a Mail Transfer Agent, tries MX records in order of preference. When multiple records have the same preference value, Exim randomizes the list before attempting delivery.
6 Sep 2022 - Exim Wiki
Can Proofpoint implementation and MX record changes during IP warming affect email deliverability?
Does having an MX record on the from domain improve email deliverability?
How can I bulk check and clean MX records for a list of domains?
How can I identify the SMTP provider from an MX record?
How can I lookup and categorize MX records for a large list of email addresses?
How do CNAME records affect DNS records like SPF, DKIM, DMARC, and MX?
How do MX records impact email bounces and sender reputation?