Hi there,
We’ve encountered a performance disparity with our NextJS project’s API endpoints, specifically when comparing execution times between our local environment and Netlify.
On our local MacBook M1, the API endpoint takes only 300-500ms to complete; however, when deployed on Netlify, the same API endpoint takes more than 2s to complete. Please see the attached screenshot below:
In our codebase, this API endpoint makes requests to our internal APIs, which are hosted on AWS. These requests include:
- A request to our internal API to retrieve Shopify configuration.
- A request to our internal API to retrieve store data.
I’m curious about what’s causing the slowdown in the API execution on Netlify. Could the difference in regions between our Netlify instance and the internal server be a factor? We’re based in Melbourne, Australia.
Do you have any suggestions for improving the performance of our Netlify instance?
Thank you in advance.