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

perf(api): use cron triggers to update kv metadata #935

Merged
merged 5 commits into from
Feb 9, 2024
Merged

Conversation

ayuhito
Copy link
Member

@ayuhito ayuhito commented Feb 9, 2024

Closes #873.

This PR hugely simplifies the KV schema for all metadata to fix a bunch of messy caching issues and propagate updates more accurately as the previous schema stored each font with its own key, while now all fonts are stored in a single key with different categories having their own key instead of individual store.

Since endpoints are cached, performance falloff is negligible and in some cases may improve due to better caching rules in place. We should expect less KV reads in total as there will be a higher cache hit ratio.

The motivation for the KV schema change is to allow us to update our metadata with cron triggers, leading to more predictable and reliable updates.

Copy link

changeset-bot bot commented Feb 9, 2024

🦋 Changeset detected

Latest commit: 62c6321

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ayuhito ayuhito merged commit 8ec7d3e into main Feb 9, 2024
4 checks passed
@ayuhito ayuhito deleted the api/cron-trigger branch February 9, 2024 02:22
@github-actions github-actions bot mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Cron Triggers for API
1 participant