Why is the perfromance so slow for reading & writing from\to S3 using boto3?

0

I have a FASTAPI python server hosted on EC2 instance. My server has a few endpoints to read & write data from\to from\to S3 using boto3. Sending the first few initial requests to read a single small file (~9kb) takes ~10 seconds. Then the performance gets better for the subsequent requests. If I wait ~10s before another request, the subsequent request takes the same ~10s. It seems to be related to some initial handshake, but I could not find any information online.

Could you please shed some light on why it takes so long for the first request or requests after some inactivity and how to improve this timing?

Thank you in advance!

preguntada hace 7 meses50 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas