Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi i have webshop and want to setup loadbalance with database on separate server, but what will happen when there is newsletter sendind mail. My modest idea is that those webserver wont know who is sent what and may happen to send multiple times? For example, WEB1 trigers sending and then WEB2 triggers sending the same mails.

share|improve this question
up vote 5 down vote accepted

You put outgoing email jobs into a queue, and then have a worker process (perhaps one on each server) consume queued messages and act on them.

The worker process claims a queue message (making it unavailable for other workers to consume), sends the email, and then ACKs the message after successful completion. If messages aren't ACKed within a certain timeout, they re-appear in the queue for another worker to consume.

RabbitMQ is a well-respected message queuing system. Redis, gearman, and even something like Amazon's Simple Queue Service are other options.

share|improve this answer
I will check mail queueing information and RabbitMQ also, thank you – titus Aug 8 '13 at 22:53
To clarify - the technology I mention in this answer is not mail-specific. It's a generic class of technologies that allow one to de-couple application parts so they can run independently of each other. One usage of this type of architecture is sending mail. – EEAA Aug 9 '13 at 0:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.