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?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ