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 Answer
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
EXPERT
answered 5 months ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions