How can I speed up cold starts for my containerized app?

0
5
Asked By CuriousCoder42 On

I'm working on a containerized application that acts as an API server, and I'm trying to create an Amazon Machine Image (AMI) for it. The app relies on loading very large files into memory when it starts up. I've noticed that the initial startup of the server takes over 10 minutes, which is really frustrating since it performs well and starts quickly (in just 2 seconds) on subsequent restarts. I'm aware that cold starts are usually unavoidable and that you can't pre-load data into memory before startup, but this long wait time for the first launch is quite bothersome. Any tips or advice on how to deal with this issue?

1 Answer

Answered By TechWhiz23 On

Just a thought, is your app built in Java? There's not much you can do with cold starts in that case, but if you're using AWS Lambda, there's a feature called SnapStart that helps with lengthy startup times. Not sure if ECS has any similar feature, though. Let me know if I'm wrong!

CuriousCoder42 -

Actually, I’m using Python with FastAPI for this project. I can’t use Lambda because my app is GPU intensive.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.