You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently processing the payload via background processing (such as delayedjobs) even though the processing is very minimal. Is this the right way to go about it?
Also, what happens if there are many events coming from Mandrill? Is it smarter to batch the events to process them multiple at a time? If so, would love a few pointers.
The text was updated successfully, but these errors were encountered:
I don't know if there are any hard and fast rules here .. a lot probably depends on your mail volumes, your server infrastructure, and the complexity of the mail processing you required.
However I can say that for all the deployments I've used mandrill webhooks (range from low to 10k messages/day):
as a rule, I always throw the payload on background queues (DelayedJob and resque) to minimise load on the web tier, and make background processing manageable/distributable
that means always one event per background job (i.e. not batched multiple events into a single background job)
This keeps things clean and decomposed, and I've yet to hit any case/issues that would make me think about optimising this by trying to batch multiple events in one background job.
And bearing in mind that Mandrill has complete discretion over whether it's going to send you 1,2,.. 10 or 100's of events in a single webhook call - regardless of how much mail you are sending - it is quite a hairy proposition to contemplate an optimisation that pre-supposes multiple events coming in as a single POST from mandrill.
I did not know that Mandrill may send more than 1 event in a single webhook call. But good to know. I suppose since this gem already breaks down a call into multiple events, not much can be done anyways. Thanks again.
I'm currently processing the payload via background processing (such as delayedjobs) even though the processing is very minimal. Is this the right way to go about it?
Also, what happens if there are many events coming from Mandrill? Is it smarter to batch the events to process them multiple at a time? If so, would love a few pointers.
The text was updated successfully, but these errors were encountered: