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 個回答
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
專家
已回答 6 個月前
  • 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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南