Performance issues on /api/ url (150ms+ for a hello world endpoint)

I’m reaching you because I’m currently encountering some performance issues on a Nuxt3 Netlify hosted website (https://6548ba46a334a90776c3c91d--iridescent-buttercream-7855d6.netlify.app/).

I’ve constated that server API calls under /api/ are quite slow (130ms approximately, sometimes 500ms+) on my Netlify instance in production. Even with a simple “Hello world” eventHandler.

For example, here is the code of my hello world api endpoint :

and the mapped url :
https://6548ba46a334a90776c3c91d--iridescent-buttercream-7855d6.netlify.app/api/status

this Url is responding approximately 130-200ms (with 600ms peaks sometimes), which seems a lot for such a simple request.

In local environment, I have quite better performance (approximately 6ms for this particular endpoint !). Why such a gap between development and production application ?
Note that the webpage which is rendered using ISR is loading quite faster (around 45ms)

Here is a blank repository which reproduce the issue :

You can notice that on my other production website, with database fetching… I have approx 160ms loading time.

Is there a way to sensitively boost the loading time on server api requests ?

Please do not compare localhost to a production server and even if you do, do not expect the same speeds. There’s a difference between sending a request to your own device, versus sending a few thousand bytes over the wire across oceans.

150ms (or anything below 500ms) is a fairly expected value for AWS Lambda responses and not something we would be debugging as there’s no issue to debug here.