Hi, sorry if this has been discussed before, but I wanted to know if I can improve the starting time of my Phoenix app. For reference, I am running a lightweight Phoenix web app on one node and another node running Fly Postgres (both are shared-cpu-1x:1024MB). Both nodes are running in the same region close to me.
The web app has auto start/stop enabled, and has high response times when the node is running. However, when navigating to web app when the node is down (after it automatically shuts down), it takes ~3-4 seconds to load the page for the first time. Is this normal times for Phoenix, or is there something wrong? I dont see anything out of ordinary in logs, but here they are just in case (when navigating to web app when its down) -
2024-01-10T21:18:02Z proxy[6e82535b226228] lhr [info] Starting machine
2024-01-10T21:18:02Z app[6e82535b226228] lhr [info][ 0.048171] PCI: Fatal: No config space access function found
2024-01-10T21:18:03Z app[6e82535b226228] lhr [info] INFO Starting init (commit: 8995e367)...
2024-01-10T21:18:03Z app[6e82535b226228] lhr [info] INFO Preparing to run: `/app/bin/server` as nobody
2024-01-10T21:18:03Z app[6e82535b226228] lhr [info] INFO [fly api proxy] listening at /.fly/api
2024-01-10T21:18:03Z proxy[6e82535b226228] lhr [info]machine started in 486.015671ms
2024-01-10T21:18:03Z app[6e82535b226228] lhr [info]2024/01/10 21:18:03 listening on ...
2024-01-10T21:18:06Z app[6e82535b226228] lhr [info]21:18:06.410 [info] Running ....Endpoint with cowboy 2.10.0 at :::8080 (http)
2024-01-10T21:18:06Z app[6e82535b226228] lhr [info]21:18:06.413 [info] Access ....Endpoint at ...
2024-01-10T21:18:06Z proxy[6e82535b226228] lhr [info]machine became reachable in 3.268536221s
2024-01-10T21:18:06Z app[6e82535b226228] lhr [info]21:18:06.464 request_id=F6kZDxKr8H75S0YAAAGB [info] GET /
2024-01-10T21:18:06Z app[6e82535b226228] lhr [info]21:18:06.466 request_id=F6kZDxKr8H75S0YAAAGB [info] Sent 200 in 1ms
2024-01-10T21:18:06Z app[6e82535b226228] lhr [info]21:18:06.963 [info] CONNECTED TO Phoenix.LiveView.Socket in 48µs