How to use a production WSGI Flask server on autoscale Deployments?

Question: What is the correct way to set up a production WSGI server on Replit for flask autoscale deployments?

I found https://replit.com/talk/learn/How-to-set-up-production-environment-for-your-Flask-project-on-Replit/139169 from the pre-deployments era (Google excludes it when filtering from the past year) so I wonder whether or not it is still good advice. I’m terrified of accidentally leaving autoscale processes in an endless loop of compute unit use. Thank you.

Hi @jsalsman !
I would conncet it normally, I don’t think there’s anything different. Just setup the ports correctly and it should be fine.
Do test it first, though, and see if it’s burning your compute units.

5 Likes

Don’t worry, this is not possible. Autoscale deployments are only billed when HTTP requests are currently being processed, and all requests have a 5 minute timeout. It goes to sleep the rest of the time.

4 Likes