postal icon indicating copy to clipboard operation
postal copied to clipboard

Load testing / scalability for processing incoming emails

Open timraybould opened this issue 7 years ago • 1 comments

Hi there,

I run an app which receives a fair amount of email (200k last week, and growing). I have 2 domains which can receive mail. I currently have an instance of Postal running in production (as of yesterday) on the lower volume domain and everything is working great. Everything is getting pushed to a webhook which processes the email and puts it in my database. Very happy with it.

My question is: what should I expect once I switch over the DNS of the high volume domain? It's running on an 8GB digital ocean server. Will all email be processed sequentially or is there some level of parallel work? My emails take on average 1s each to process.

I'm hoping one server can handle my current volume pretty easily, but I am planning on setting up a backup with a lower MX priority before pushing live. I'm also thinking that a quick and easy way to scale would be to point MX records with the same priority at several different postal servers. I don't care much about the mysql / rabbitmq databases being synced across them. As long as the mail gets routed to my Firebase database.

I know you won't be able to provide super accurate numbers, but, just looking to pick the brain of those who have been running emails through this for some time and would have a much better idea of what to expect than me.

If anyone has any thoughts or stats on previous load testing results or production use volumes would be really appreciated!

timraybould avatar Jan 25 '19 14:01 timraybould

I've since read a bunch of the existing issues asking a similar question, so I'll close this one. In case it helps anyone (including future me), I:

  • increased workers to 8 via /opt/postal/config/postal.yml per #290
  • tweaked mysql settings via /etc/mysql/my.cnf per @catphish's suggestion in #324
  • restarted the server

Also found #697 to be a helpful discussion on the topic. If I end up upgrading the box to those specs, I'll be sure to try the suggested configuration there.

timraybould avatar Jan 25 '19 17:01 timraybould