ExchangeDefender LoadBalancer | ExchangeDefender              [ Skip to content ](#main)  [ ![ExchangeDefender](/assets/images/xd_logo_blue.png) ](/)   Email Security     ![Platform Overview](/assets/images/m-xd-pro.png)### ExchangeDefender PRO

Enterprise-grade email security made simple for every business.

 [Sign Up](/sign-up) [Live Demo](/demo) 

 [Email Security

Stops spam, malware &amp; phishing in real time.

 ](/email-security) [Encryption

Secure your emails, attachments &amp; sensitive data.

 ](/corporate-email-encryption) [Web File Sharing

Easy, safe cloud file sharing with access control.

 ](/web-file-server) [Live Archive

Locked-in email backup &amp; continuity during outages.

 ](/livearchive-backup) [Emergency Inbox

Keep email flowing without interruption if your provider fails.

 ](/inbox) [Spearphish

Train your team with phishing simulations &amp; risk tracking.

 ](/spearphishing) 

  Managed Email    ### Enterprise-Grade Managed Email

Reliable, secure, and fully managed email operations for modern organizations.

 ![ExchangeDefender](/assets/images/managed_email_menu.png) 

 [Microsoft365/Google Email Management

Expert management and security for Microsoft 365 and Google Workspace email.

 ](/managed-email-operations) [AI Advisory

Secure, practical AI consulting &amp; implementation for SMBs.

 ](/management-ai) 

  Company    ### ExchangeDefender: 29+ Years of Trust

We are a cybersecurity company focused on business email protection, with 29+ years of experience keeping organizations secure, connected, and resilient.

 ![ExchangeDefender](/assets/images/careers_1.png) 

 [ About Us

Learn our purpose, values, and the mission behind every decision.

 ](/about-us) [ Blog

News, product updates and email security insights.

 ](/blog) [ Capabilities

Discover the tech and expertise that keep your email secure around the clock

 ](/capabilities) [ Careers

Be part of a team using modern tech to solve real threats and ship great work.

 ](/careers) 

 [Partners](/partners) [Docs](/docs) [Contact Us](/contact)  Talk to a Human 

  Open menu     

 Menu
----

   Email Security     [Email Security](/email-security) [Encryption](/corporate-email-encryption) [Web File Sharing](/web-file-server) [Live Archive](/livearchive-backup) [Inbox](/inbox) [Spearphish](/spearphishing) 

    Managed Email     [Microsoft365/Google Email Management](/managed-email-operations) [AI Advisory](/management-ai) 

    Company     [About Us](/about-us) [Blog](/blog) [Capabilities](/capabilities) [Careers](/careers) 

  [Partners](/partners) [Docs](/docs) [Contact Us](/contact) Talk to a Human 

   November 2, 2011 · [ExchangeDefender](https://www-preview.exchangedefender.com/blog?category=exchangedefender)

ExchangeDefender LoadBalancer
=============================

On a random basis, one of the most pressing issues faced by our customers was mail delivery delays. These random delays happen to only about 12% of the nodes, however, due to the sheer volume of mail processed by our inbound network that 12% would inevitably cause our staff and customers quite an inconvenience.

As more and more companies begin to depend on email for the main source of communication for their business, mail delivery time becomes a major factor when partnering with a hosting vendor. Because of the critical need for instant delivery, we had to quickly overcome our growth and produce an immediate solution.

**The Unforeseen Weakness in Round Robin**

After the ATS power outage earlier this quarter we were forced to reevaluate or solutions across the board and make drastic improvements. One of the areas that desperately needed a redesign was our inbound mail load balancer.

In the early days of ExchangeDefender we utilized a round robin based load balancer. In short how it works is the MX records for ExchangeDefender clients are pointed to both our Dallas datacenter and our Los Angeles data center. After the SMTP connection hit either data center, the connection was then forwarded off to any random inbound node in the virtual server list.

[![Picture1](http://www.exchangedefender.com/blog/media/3ac0525c32e6_F081/Picture1_thumb.png)](http://www.exchangedefender.com/blog/media/3ac0525c32e6_F081/Picture1.png)

Until earlier this year, the round robin design worked quite well, however, as the number of messages being processed grew, so did the delivery delays. We started to notice that the load balancer that was able to previously balance the connections was no longer balancing at all. Day after day, we saw some inbound servers having upwards of 200 concurrent connections at a time. More than half of the other inbound nodes in the respective data center had no connections at all.

The biggest issue preventing the round robin configuration from working was the randomized assignment of which data center would be used and which inbound server that would receive the connection. To begin to tackle the issue, we had to re-evaluate the entire load balancing solution because you can never properly balance a round robin based connection. We switched our load balancers to use a weighted least connection based routing scheme. Upon activation it seemed to balance connections a bit better than the round robin connection. Nearly an hour after activation however, we saw a large queue size being placed on a few inbound nodes.

**Brand New Logic**

To completely resolve the issue, we had to introduce additional logic to the load balancer. The recurring issue we faced was the basic nature of SMTP. An SMTP connection for one “message” being transmitted could equal four concurrent open connections. Therefore, naturally, the connection count cannot be relied upon for load balancing. We then decided to leverage our queue reporting service which reports the number of queued messages and open conversations with unique IPs. Finally, we created a PHP script that runs on the load balancer and splits itself to check the connection counts across all nodes every 10 seconds. We used a very simplistic formula for load balancing:

> If(($numActiveServersInSite &gt;= ($numServersInSite / 2)) &amp;&amp; ($nodeConnections &gt;= ($nodeAverageConnectionCount + 50)) &amp;&amp; ($nodeConnections &lt;= $highThreshold)){Shutoff new connections}

[![Picture2](http://www.exchangedefender.com/blog/media/3ac0525c32e6_F081/Picture2_thumb.png)](http://www.exchangedefender.com/blog/media/3ac0525c32e6_F081/Picture2.png)

In non-code terms, we now calculate the number of servers in each site (DC). If there are more than half of the servers offline in a site, the load balancer will no longer shut off new node connections. If the current node connection count is either greater than the high threshold or has 50 active connections above the average connection count of servers in the site then it will shut off the node.

**The End Result**

After implementing the new load balancer algorithm we saw drastic improvements of balanced connections and delivery times for inbound messages. The most notable improvement took place on September 10th where we processed 2.8 million messages and we saw minuscule delays across the board and received zero complaints about deliver delays.

Travis Sheldon VP Network Operations, ExchangeDefender (877) 546-0316 x757 

  [  Previous post Tips For Handling The Four Most Common Questions And Objections About ExchangeDefender’s Hosted Exchange November 1, 2011  ](https://www-preview.exchangedefender.com/blog/2011/11/tips-for-handling-the-four-most-common-questions-and-objections-about-exchangedefenders-hosted-exchange) [  Next post ExchangeDefender Executive Podcast #2 November 4, 2011  ](https://www-preview.exchangedefender.com/blog/2011/11/exchangedefender-executive-podcast-2)  Related Posts
-------------

  [ ![](https://storage.services.exchangedefender.network/exchangedefender-blog/blog/2026/04/xd10.png)  2 Apr  ](https://www-preview.exchangedefender.com/blog/2026/04/announcing-exchangedefender-10)###  [Announcing ExchangeDefender 10](https://www-preview.exchangedefender.com/blog/2026/04/announcing-exchangedefender-10) 

 [Read more: Announcing ExchangeDefender 10](https://www-preview.exchangedefender.com/blog/2026/04/announcing-exchangedefender-10) 

   [ ![](https://storage.services.exchangedefender.network/exchangedefender-blog/blog/2025/09/Top-7-IT-Solutions-Every-Small-Business-Needs-in-2025.jpg)  30 Sep  ](https://www-preview.exchangedefender.com/blog/2025/09/top-7-it-solutions-every-small-business-needs-in-2025)###  [Top 7 IT Solutions Every Small Business Needs in 2025](https://www-preview.exchangedefender.com/blog/2025/09/top-7-it-solutions-every-small-business-needs-in-2025) 

 [Read more: Top 7 IT Solutions Every Small Business Needs in 2025](https://www-preview.exchangedefender.com/blog/2025/09/top-7-it-solutions-every-small-business-needs-in-2025) 

   [ ![](https://storage.services.exchangedefender.network/exchangedefender-blog/blog/2025/09/Website-Active-Image-10.jpg)  23 Sep  ](https://www-preview.exchangedefender.com/blog/2025/09/exchangedefender-rolls-out-advanced-reject-policies-for-safer-inboxes)###  [ExchangeDefender Rolls Out Advanced 'Reject Policies' for Safer Inboxes](https://www-preview.exchangedefender.com/blog/2025/09/exchangedefender-rolls-out-advanced-reject-policies-for-safer-inboxes) 

 [Read more: ExchangeDefender Rolls Out Advanced 'Reject Policies' for Safer Inboxes](https://www-preview.exchangedefender.com/blog/2025/09/exchangedefender-rolls-out-advanced-reject-policies-for-safer-inboxes) 

   Search the blog   Search     Recent Posts
------------

- [ExchangeDefender New UI is Live](https://www-preview.exchangedefender.com/blog/2026/05/exchangedefender-new-ui-is-live)
- [Announcing ExchangeDefender 10](https://www-preview.exchangedefender.com/blog/2026/04/announcing-exchangedefender-10)
- [Merry Christmas](https://www-preview.exchangedefender.com/blog/2025/12/merry-christmas)
- [Why IoT Devices Are a Hidden Security Risk for Your Business](https://www-preview.exchangedefender.com/blog/2025/11/why-iot-devices-are-a-hidden-security-risk-for-your-business)
- [Top 5 IT Problems Small Businesses Face in 2025 — and How to Fix Them](https://www-preview.exchangedefender.com/blog/2025/10/top-5-it-problems-small-businesses-face-in-2025-and-how-to-fix-them)

Categories
----------

- [Archiving](https://www-preview.exchangedefender.com/blog?category=archiving) (21)
- [Business Continuity](https://www-preview.exchangedefender.com/blog?category=business-continuity) (13)
- [Compliance](https://www-preview.exchangedefender.com/blog?category=compliance) (8)
- [ExchangeDefender](https://www-preview.exchangedefender.com/blog?category=exchangedefender) (349)
- [General](https://www-preview.exchangedefender.com/blog?category=uncategorized) (590)
- [Hosted Services](https://www-preview.exchangedefender.com/blog?category=hosted-services) (86)
- [Industry News](https://www-preview.exchangedefender.com/blog?category=industrynews) (29)
- [Marketing](https://www-preview.exchangedefender.com/blog?category=marketing) (18)
- [Phishing](https://www-preview.exchangedefender.com/blog?category=phishing) (5)
- [PRO TIPS](https://www-preview.exchangedefender.com/blog?category=pro-tips) (44)
- [Product Features](https://www-preview.exchangedefender.com/blog?category=product-features) (54)
- [Security](https://www-preview.exchangedefender.com/blog?category=security) (65)
- [Shockey Monkey](https://www-preview.exchangedefender.com/blog?category=shockey-monkey) (22)
- [Spamfilter](https://www-preview.exchangedefender.com/blog?category=spamfilter) (5)
- [Support](https://www-preview.exchangedefender.com/blog?category=support) (45)
- [Webinars](https://www-preview.exchangedefender.com/blog?category=webinars) (44)

  Solutions
---------

- [Stop Spam &amp; Malware](/email-security)
- [Hands-Free Email Backup](/livearchive-backup)
- [Instant Email Recovery](/inbox)
- [Send Private Emails](/corporate-email-encryption)
- [Train Against Email Threats](/spearphishing)
- [Share Files Safely](/web-file-server)

Company
-------

- [About ExchangeDefender](/about-us)
- [Compliance &amp; Legal](/our-compliance)
- [Become a Partner](/partners)
- [Support Portal Login](https://support.exchangedefender.com/)
- [Microsoft 365 Email Management](/managed-email-operations)
- [AI Advisory Service](/management-ai)

 ![ExchangeDefender](/assets/images/dark-xd-logo.png)USA: +1 (407) 465-6800

United Kingdom: 0800 8620149

Australia: +61 0390010641

Fax: +1 (954) 839-8737

 [    ](https://www.facebook.com/ExchangeDefender) [    ](https://www.twitter.com/XD_Defender) [    ](https://www.linkedin.com/company/exchangdefender) [    ](/blog) 

© 2026 Own Web Now Corp - All rights reserved

 &lt;/&gt; with ❤️ in Orlando

 [SLA](/sla) [TOS](/tos) [PRIVACY](/privacy-end-users) [AUP](/aup) 

 We're Here to Help 👋
--------------------

Tired of AI 🤖 and hold music? Request a call or text (sms/telco charges may apply) and someone with a brain and a pulse will get in touch with you promptly.

  Close modal     

      Website   

  Name      Email Address      Company      Phone     

  Preferred Contact Method   Text me    Call me  

   Call Date    Call Time    Time Zone  Eastern Central Mountain Pacific London Paris Madrid Berlin Tokyo Dubai Sydney   

  Request Human Contact Submitting...  

  Close 

 Start Your Free Year
--------------------

Enter your details and we will set up your free year of email protection.

  Close modal     

       Website   

  Full Name      Email     

  Continue Submitting...  

  Close 

 Try ExchangeDefender for Free 💰
-------------------------------

We look forward to helping you secure your email. We offer a free 30-day no-risk trial, just fill out the form below and one of our onboarding techs will get you started. If you'd just like to take a look at the demo, click here for a [live demo site](/demo).

  Close modal     

      Website   

  Name      Email Address      Company      Phone     

  Preferred Contact Method   Text me    Call me  

   Call Date    Call Time    Time Zone  Eastern Central Mountain Pacific London Paris Madrid Berlin Tokyo Dubai Sydney   

  💰 Get your free month Submitting...   🏃 Explore a Live Demo Submitting...  

  Close 

 Train Your Team Before the Hackers Do 👋
---------------------------------------

ExchangeDefender Spearphish is our new phishing simulation and training tool, designed to help your team spot scams before they click. Want to be first in line? Request early access or get a personal demo — just drop your name and email below.

  Close modal     

       Website   

  Name      Email Address      Company      Phone     

  Preferred Contact Method   Text me    Call me  

   Call Date    Call Time    Time Zone  Eastern Central Mountain Pacific London Paris Madrid Berlin Tokyo Dubai Sydney   

  Request Early Access Submitting...  

  Close
