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

change newsletterSignupAgent.refresh period from 60 to 15 minutes #27182

Merged
merged 1 commit into from
May 24, 2024

Conversation

dblatcher
Copy link
Contributor

What is the value of this and can you measure success?

Frontend holds a cached copy of the newsletter api data in memory using the NewsletterSignupAgent, which the NewsletterSignupLifecycle refreshes every 60 minutes.

The newsletter API uses a fastly cache, so when frontend refreshes the data it gets will not be the latest version. In practise, this means that updates made to the newsletter data (which can be made by editorial using the newsletter tool take 1-2 hours to appear on the site.

Increasing the frequency to 15 minutes should be safe since:

  • fetching and parsing the data from the API is not an expensive operation
  • identity fetches the same data every 5 minutes, so frontend should never be 'ahead' of identity (if that happened, frontend might render sign-up forms for newsletters that identity doesn't have yet, so the sign-up requests to identity would fail)

What does this change?

Changes the frequency of the newsletterSignupAgent.refresh job in NewsletterSignupLifecycle from 60 to 15 minutes.

Checklist

@dblatcher dblatcher requested a review from a team as a code owner May 24, 2024 10:18
@dblatcher dblatcher merged commit 3ef13d0 into main May 24, 2024
3 checks passed
@dblatcher dblatcher deleted the dblatcher/refresh-newsletters-more-often branch May 24, 2024 10:56
@prout-bot
Copy link
Collaborator

Seen on ADMIN-PROD (merged by @dblatcher 12 minutes and 3 seconds ago)

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD (merged by @dblatcher 12 minutes and 10 seconds ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants