Scaling SMTP was Re: [GMF] help with what this message means?

Glenn Glazer

On 6/9/2018 22:34, Shal Farley wrote:
Hi Lena!

> uses only one outbound server (a SMTP proxy):

Thanks, I was kind of wondering about that but wasn't sure.

I don't know enough about modern systems configuration (and all the available edge devices) to guess whether that can remain true as grows.



SMTP is a state-in-transaction protocol, meaning that during a transaction (sending a single message) there is state (mostly keeping track of what stage of the protocol we are in) during a transaction, but there is no state in-between transactions.

The typical way of scaling such things is to use horizontal scaling with a load balancer front end that has session traffic marking.  The basic idea is that if you have three servers, Alice, Bob and Charlie that are all identical in terms of SMTP processing, and someone sends a message. The balancer may assign this transaction to Charlie and then all packets for this transaction (session, in load balancer terms) will be routed to Charlie.  Once the transaction is completed, the session info is deleted and the next message may to go Alice, to Bob or to Charlie again, route to that host for that transaction and so on. 

There are different policies for choosing which of Alice, Bob or Charlie is chosen for a particular session, the two most common are random assignment and assignment to the host with the least number of sessions at the time of decision.

All of a transaction usually takes only seconds, the sender perceives it as the time between clicking send and a notification from their MUA that the mail was sent.




[ad trimmed by moderator]

Join to automatically receive all group messages.