Why taking so long to fulfil the request ?

I have a web scrapping application, with node.js backend , vite.js frontend that backend deployed in fly.io(free) and frontend deployed in vercel.
When i ran this app in local environment , for per request it took maximum 6.120s . but after i deployed it take some times even 50s to get request.

  1. cz i use two different platforms, it took so long ?
  2. How should i avoid this ?

Having 2 instances can help, as you’re deploying there can be some lag involved in “telling” all other nodes about your new instance.

I see you’re using a volume, that means deploys are not zero downtime if you only have 1 instance. First we have to stop the instance and then start the new one. If you had 2 instances, we can do this 1 by 1 and requests will get routed to the another instance until the restart is complete.

yes. i’m using volume. This is my very first deployment in fly. If i’m right, i used volume Because I have SQLite database . When I add SQLite database , I created the volume.

That makes sense.

There’s not much we can do for latency on deploy. Do you get high latency even after a few minutes of having the app deployed?

Sometimes well. Sometimes if fulfilled the request within 3 seconds. Sometimes it gives timeout error.