title: SMTP through HAProxy / Elastic Beanstalk
body: <p>kind of an unusual setting here:
  We have an SMTP service running on Tomcat / Elastic Beanstalk on AWS in an auto-scaling group behind an ELB load-balancer.
  Now, for one of our clients we need to have a static IP for the SMTP service. Since this is not possible with the out-of-the-box load-balancer on AWS, we have a separate HAProxy instance transparently routing the :25 traffic trough the AWS load-balancer.</p>
  
  <p>For some reason, the HAProxy chokes after exactly 3 SMTP calls. After that connections either time out or take minutes to go through.</p>
  
  <p>The interesting part is that the following configurations work perfectly fine:</p>
  
  <ul>
  <li>Calling the SMTP service on the AWS load-balancer directly</li>
  <li>Load-balancing the Elastic Beanstalk's nodes through HAProxy directly. </li>
  <li>Target setting with HTTP calls on port 80, instead SMTP on port 25</li>
  </ul>
  
  <p>Help is really appreciated</p>