OpticalGaming
04-09-2009, 07:34 PM
Hi there,
We've got about 500,000 accounts on our website. We store a bunch of details on users and every now and again (every few months) we like to send an email to all of the users.
The problem I'm having is the user count is going up, so more emails need to be sent. Our current set up doesn't seem to be able to cope with this.
What's the best way to go about this? This is the current method I use (PHP/MSSQL):
- Select 250 emails from the database who we haven't sent an email to yet
- Loop through every email, and send the email off
- Update the database (MSSQL) to say that the email has been sent
I currently use Cent OS 5 with cPanel/Exim for this and we now have a huge queue on the server (of about 70,000 emails) -- this would be way higher but I eventually stopped it after I noticed the emails were backlogging.
What's the best configuration for sending an email to this many users? Should I be using PHP to do this? Should I use something else, perhaps Python (I heard this was good)?
Would I be right in thinking that using a SMTP server (rather than php's mail()) would be a better option? What would be the best Windows SMTP server to handle this (I only have one Linux server with cPanel/Exim)?
Given a suitable Windows SMTP server, would it be better to set up multiple SMTP servers rather than a single one? I have around 10 Windows based servers that I could use to 'spread the load'.
Looking for some input on this.
Regards
We've got about 500,000 accounts on our website. We store a bunch of details on users and every now and again (every few months) we like to send an email to all of the users.
The problem I'm having is the user count is going up, so more emails need to be sent. Our current set up doesn't seem to be able to cope with this.
What's the best way to go about this? This is the current method I use (PHP/MSSQL):
- Select 250 emails from the database who we haven't sent an email to yet
- Loop through every email, and send the email off
- Update the database (MSSQL) to say that the email has been sent
I currently use Cent OS 5 with cPanel/Exim for this and we now have a huge queue on the server (of about 70,000 emails) -- this would be way higher but I eventually stopped it after I noticed the emails were backlogging.
What's the best configuration for sending an email to this many users? Should I be using PHP to do this? Should I use something else, perhaps Python (I heard this was good)?
Would I be right in thinking that using a SMTP server (rather than php's mail()) would be a better option? What would be the best Windows SMTP server to handle this (I only have one Linux server with cPanel/Exim)?
Given a suitable Windows SMTP server, would it be better to set up multiple SMTP servers rather than a single one? I have around 10 Windows based servers that I could use to 'spread the load'.
Looking for some input on this.
Regards
