Open jimleroyer opened 10 months ago
How to split out the celery config in k8s:
Didn't get to merging and testing this Monday, will merge and test first thing Tuesday.
merged to staging!
sent api single / bulk with all priorities for sms and email.
Verified using this CloudWatch query) that as of 10:51 today,
deliver_sms
tasks are being run on the new celery-sms-send
pods instead of the oldcelery
pods.deliver_email
tasks are still running on the old celery
pods.Using locust sent 3300 SMS to the internal test # at 20 sms / second.
PR to add these charts to the SMS dashboard: https://github.com/cds-snc/notification-terraform/pull/917
not merging the dashboard PR until after we have the sms deployment on prod.
ready for QA!
Jimmy to QA
A better query to identify SMS still being sent by the old celery pods:
fields @timestamp, kubernetes.container_name, log, @logStream
| filter @message like /Start sending SMS for notification id/
| filter kubernetes.container_name != "celery-sms-send"
| sort @timestamp desc
| limit 200
So this query does find one sms sent on the old pods on Sept 20: https://staging.notification.cdssandbox.xyz/services/d6aa2c68-a2d9-4437-ab19-3ae8eb202553/notification/77630fd8-61c8-45ac-aaaa-ca5a343b8c8b This was a 2FA code sent by Notify. (for logging in to Notify) It's possible (well, likely) that there's some code that's using the old queues that I missed when I moved sms to their own queues.
ok!
sms 77630fd8-61c8-45ac-aaaa-ca5a343b8c8b sent to the notify-internal-tasks queue for delivery
So! we likely should send these sms via the new sms send pods as well. Although it's not terribly likely that we'll have a flood of people logging into Notify at the same second.
As discussed on Slack we will leave it as it is for now, and consider some sort of fix in a future version of the scaling work.
Steve, Ben and I spoke offline about the SMS notification that goes through the older pod to deliver SMS. We agreed it's okay for now as this is solely meant for GCNotify 2FA. These do not represent a risk for overflooding our SMS rate limit with AWS, so having these SMS going through the scaled up nodes would be fine.
We will create a card to move the GCNotify 2FA SMS into their own dedicated queue, using the newer SMS dedicated pods.
QA test is approved, because the intended behavior of expected SMS uses the newer SMS dedicated pods. The 2FA of GCNotify is not a risk nor a blocker for scaling up.
Description
As a Notify developer, I need SMS delivery tasks to be run by a dedicated group of pods so that I can treat them differently than email delivery tasks.
WHY are we building?
The sending rates set by AWS are different for email and sms, and hence we need to be able to tune them separately. We have decided that the best way to do this right now is to have the email and sms delivery tasks run on different groups of pods.
WHAT are we building?
VALUE created by our solution
We will be able to scale up both email and sms sending rates.
Acceptance Criteria
deliver_sms()
running on dedicated celery podsQA Steps