Accessing lightsail container is very slow at certain times of the day, how to solve it?

0

Accessing my lightsail container is very slow at certain times of the day, especially when establishing a websocket connection, often taking ten seconds. Is there any way to reduce the waiting time? Would configuring an API gateway help with this? or I should change to another service? Thank you.

1 Risposta
0

Hello.

What is Lightsail's CPU and memory load during that time?
There may be a large number of accesses to Lightsail, which may affect the response.
If you think that Lightsail's specifications are insufficient, you may want to consider migrating to EC2 or ECS.
EC2 and ECS have a wider range of scale than Lightsail.

profile picture
ESPERTO
con risposta 6 mesi fa
  • It's not about CPU, my project is a simple I/O-bound fastapi server. I think it's mainly due to network issues. Do you know if add an API gateway will be helpful?

  • API Gateway is capable of managing throttling, so I think adding it may improve things to some extent.

  • thank you.

  • If you have the same fastapi server that does something mundane (e.g. just echoing back stuff over websockets), do you still get the same slowness? Can you please share more details about your setup? perhaps a sample of your Dockerfile?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande