Data API is still slow in v1

I am facing similar issue as 159188 and 161897, but in v1, on a M0 Sandbox cluster, while connecting from an app deployed on Vercel in US region. It’s taking more than 4s to perform a simple Insert into a fresh collection. Due to which, my Edge function on Vercel is timing out.

Which is the biggest bottleneck here?

  • The cold start of Mongo’s HTTP cloud function?
  • The M0 cluster?

Have the

internal optimizations

mentioned in the previous threads already been implemented in v1?

The lightweight nature of REST workflow is getting voided by the excessive latency with it.

1 Like

Hi Harshith -

we now provide a workaround to use a local region for your URL, if you are running Azure or a region that is not supported in our global deployment, we now provide the ability to make this a local deployment option:

Here’s how to do it:

  1. Go to App Services

  2. Click ’ Create new app

  3. In the form, choose ‘Advanced’ and choose a local setting

  4. Go to Rules , and create default read and write for your linked cluster

  5. Go to Authentication and enable ’ api key '. Save that config, then create an API key.

  6. Go to HTTPS endpoints and click on the Data API tab. Enable the Data API.

This will create a new URL for your Data API, as we don’t yet support the ability to change the deployment model of an existing instance of the app/Data API. Your logs, etc. will have to be accessed via this new app.

We will make this easier to do in the Atlas UI soon, but let me know if this helps with performance, as well as offer GCP soon.