views:

41

answers:

1

Rich sites such as facebook send you an email for every event that takes place, notification, friend request and so on, I would like to know how costly is it for the web server to perform this action? that also 100s of time a day for active and popular users.

Thanks

+1  A: 

Usually the site do not send emails itself. It just redirects email to server MTA, which then saves it in it's queue and sends when it thinks best.

To answer your question we need the definition of "costly". To send an email you typically need to execute some DNS queries, connect to remote server, exchange data with it. Is it costly in your opinion?

FractalizeR
I would define costly as an operation that takes over 100ms to execute, since I am currently on shared hosting, I need to consider the cost of such features =).
Akay
Then the cost of sending a single email heavily depends on the server the letter is sent to, the speed of your DNS server, DNS cache, network load etc etc etc
FractalizeR
Ah i see so its quite variable, thanks for the info I will try to run some benchmarks of my own.
Akay
Also keep in mind that some hosts put a limit on the amount of emails that you can send out. media temple puts it at around 100 an hour and godaddy limits it to 250 a day. You can buy more though but then cost becomes a little more literal.
aaronasterling