开发者

limits of bulk email in GAE

I'm working on a voting app where I need to send an email to each voter to inform him or her about the electio开发者_运维技巧n. I see three methods for doing this and I'm curious what the approximate limits on the number of emails I could send with each method:

  1. In a user request, add a task to a task queue where each task sends one email. The limit here is how many tasks I can queue up in 30 seconds. Is there a way to estimate this reliably?

  2. In a user request, add one task to a task queue where that one task adds tasks to a second task queue where each task in the second queue sends a single email. Since the limit here is 10 minutes, is it a reasonable estimate that I can send 20 times as many emails as with method 1?

  3. Use a backend which doesn't have a time limit so I could presumably send as many emails as I need to.

If methods 1 or 2 could send a sufficient number of emails I would prefer to stick with them to avoid the extra complexity of using a backend. If it matters, I'm using the Python API.


Enqueue a single task which sends emails sequentially, checking the wallclock time after each email. When the time approaches 10 minutes, chain another task to continue where the current task left off. If you want to send emails faster, parallelize this, and enqueue several tasks that each send emails to a subset of users.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜