Re:The rise of the API-based SaaS
by icebraining on Friday February 26, 2016 @06:53PM
(#11185216)
Why is SMTP slower? You can open a connection, authenticate and then send as many emails as you want. Doesn't seem slower than sending POST requests with their headers and such.
[ Parent
| on HN ]
SMTP must maintain a transient state throughout the connection and respond to interactive requests...
HTTP-POST can handle the request chain inline, and deliver a single response, the decision tree is much lighter.
For that matter, HTTP-POST can partially to completely defer all processing decision trees, always returning 200 OK, offloading to a queue system that will process the request out of band, and issue the real response errors via a dashboard. Making it lighter still.
The technical answer is it's complicated.
SMTP is chatty. Even when you use PIPELINING. It tends to send way more packets than HTTP. And while you can open one connection and send multiple mails through it, the likelihood of your client library doing that is pretty low, sadly.
Re:The rise of the API-based SaaS
by tomschlick on Friday February 26, 2016 @07:04PM
(#11185271)
In theory yes, in practice that's usually not the case in my experience.