Menu

Post image 1
Post image 2
1 / 2
0

Batch email sends before rate limits look like caps

DEV Community·Can Ceylan·22 days ago
#JdKunHVt
Reading 0:00
15s threshold

What happened A small newsletter campaign was sent to 13 subscribers. The result came back in a strangely neat shape: 5 accepted, 8 failed. At first glance, that looks like a hidden provider cap. Maybe the free tier only allows five recipients. Maybe the campaign endpoint has a quiet limit. Maybe something is wrong with the subscriber list after the first few addresses. The number felt meaningful, and it was. Just not in the way it first appeared. Root cause The code was batching conceptually, but not at the HTTP request level. It sliced subscribers into a "batch" and then used Promise.all() to send one request per recipient inside that batch. So 13 subscribers still became 13 simultaneous API calls. The email provider had a default request-rate limit. The first few requests were accepted, and the rest crossed the throttle. The UI then surfaced the result as "5 sent, 8 failed", which made the failure look like a recipient limit instead of a request-rate problem.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More