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

Investigate API performance #243

Open
2 tasks
bitbeckers opened this issue Feb 6, 2025 · 2 comments
Open
2 tasks

Investigate API performance #243

bitbeckers opened this issue Feb 6, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bitbeckers
Copy link
Collaborator

bitbeckers commented Feb 6, 2025

What is it?

We have a sudden crash yesterday where the reason couldn't be determined. We know we have optimisation to perform on the API as the growing complexity in the data model introduced a lot of DB round trips.

Paths to explore:

  • API performance testing - what load makes it crash
  • API round call reductions - reduce the number of calls to Supabase

Known issues:

@bitbeckers bitbeckers added enhancement New feature or request help wanted Extra attention is needed labels Feb 6, 2025
@bitbeckers bitbeckers transferred this issue from hypercerts-org/hypercerts-app Feb 6, 2025
@bitbeckers
Copy link
Collaborator Author

Fetching the metadata image wasn’t really optimised, so when you call the hyper cert metadata you fetch the full image. This means the API could pull a couple of MBs from Supabase DB, before returning it from the API to the client. Which, obviously, can be pretty slow.

In our app we’ve split the image fetching via an API route and let Vercel handle the image caching and optimisation

@bitbeckers
Copy link
Collaborator Author

bitbeckers commented Feb 10, 2025

Investigating Railway, Sentry, Cloudflare and Vercel logs show that responses appeared to time out, but no 3xx, 4xx, 5xx errors. We do see long calltimes to supabase (>10s) and /v1/graphql POSTs (>10s)

Sentry

Image Image Image

Railway

Image Image

Cloudflare

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: In progress
Development

No branches or pull requests

2 participants