Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support bulk send to AWS SES #478

Open
2 tasks
jimleroyer opened this issue Nov 29, 2024 · 0 comments
Open
2 tasks

Support bulk send to AWS SES #478

jimleroyer opened this issue Nov 29, 2024 · 0 comments
Labels
Throughput Will boost our throughput

Comments

@jimleroyer
Copy link
Member

jimleroyer commented Nov 29, 2024

Description

As a user of GCNotify,
I want to have may emails sent even faster,
So that I can get a better user experience.

As a system operator of GCNotify,
I want to batch emails sent to AWS SES,
So that I can have higher email send throughput.

WHY are we building?

To send a higher throughput of emails.

WHAT are we building?

We want to batch emails that we send to AWS SES so that we can make less calls to AWS SES while sending more. We skip network time and send more in batches overall.

This probably should be applied to bulk priority emails as a first step, because these would tend to batch up easy with high volume and they can wait for a delay to collect these in a batch group, whereas we might want to send a high priority emails as soon as we get these and they would not have that much of a volume. Hence bulk priority emails are a great candidate for batching, helping other priority lanes at the same time as we reduce AWS SES call rate and unclutter network traffic.

VALUE created by our solution

Faster sending speed for high volume emails.

Acceptance Criteria

  • Emails with low/bulk priority should be sent as a batch to AWS SES.

QA Steps

  • Run a performance tests with a high volume of emails traffic to test the sending speed. Make a comparison performance analysis before and after the change.

Additional information

From the Scalability: Increasing send rates ADR:

The send_raw_email function contains code to send emails to SES. These are sent individually, meaning one notification leads to one network call to AWS. Hence an easy improvement is to batch the emails to be sent in a short time window as a batch to AWS.

The AWS SES API supports sending emails in bulk using a template-based approach similar to how Notify operates. There are limitations (for example, the variables have to be ascii, not unicode) but it might be a significant speedup to bulk sends with no unicode variables (including the case of bulk sends where there are no variables).

Note that without speeding up the send_raw_email() call our improvements will be limited, especially as we currently have a rate limit of 100 calls per second to AWS SES.

@jimleroyer jimleroyer added the Throughput Will boost our throughput label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Throughput Will boost our throughput
Projects
None yet
Development

No branches or pull requests

1 participant