What is the best free tier for a flask app?

I’ve been coding for a few years but always hesitant to do any web development. Finally I decided to and made a flask app. I want to deploy it on a free service to see if it will make any ad revenue. If it does I am planning to deploy it on digitalocean or vultr or keep going with free tier. What free tier do you recommend? Also I haven’t written any logic for monitoring the website like users, countries etc. Will they be providing those as well ?

Amazon gives you a free year, and it has monitoring up the wazoo with Cloudwatch. You can also run flask under Lambda, which gives you a million requests and a good chunk of CPU time per month in its free tier which never expires. If you go that route, use something like Zappa, don’t try to finagle Amazon’s godawful web GUI to build your app.

Hello @hqntrt, welcome to the FreeCodeCamp forums, I hope you find your answers :slight_smile:

If you want to run a flask app with minimal or no cost, I’d recommend Google App Engine Standard as it has a number of advantages.

  1. Free tier
  2. “Scale to zero” - allow the instance to not run, thus not cost anything. This does make it slower to response from cold, but that should be fine for testing the waters, and it is a feature you can turn off (which will increase costs)
  3. Is a Paas (Platform as a service) which means Google manages almost all of the infrastructure makes it super easy to get going and keep going.
  4. Backed by Google Cloud - one of the big three cloud providers (Amazon Web Services, and Microsoft are the other two)

All of Google’s “hosting” services, like App Engine provide Stackdriver Logging out of the box. Adding a few libraries to further integrate will give you more capabilities of inspecting, debugging and monitoring your code in the cloud. :slight_smile: This service will help you when it comes to server-side problems related to your Python code.

Now if you want to monitor information like where users are coming from, this can be done using another unrelated Google service, Google Analytics. This service will provide more information on a given user, and is handled by the client side, so it has nothing directly to do with Python.

Hopefully that helps, goodluck :slight_smile:

Thank you for answers :slight_smile:
@chuckadams aws seems complicated and sadly I am not that talented at server stuff. Last night I installed ubuntu server and nginx to learn more but I am still struggling with making it serve my flask app (gunicorn + flask-socketio + gevent-webscoket)
@bradtaniguchi google cloud seems promising and easier to manage. Can I make experiments on there without spending from my 300 dollar credit or from my 12 months time ?

Indeed, AWS is vastly complicated, but there are a lot of good tools that hide anything from most to all of the complexity for you. For javascript, that boils down to Serverless, and for python, it appears to be Zappa. The free version of PyCharm has AWS integration as well.

… And of course there’s Amazon’s official IDE, cloud9, and their CLI tool, SAM. And there’s their online GUI for creating and editing lambdas ad hoc. Amazon’s web UIs are some of the worst UX since … wow. So on one hand, you have the gold standard of cloud services with Lambda that’s basically free for development (1M requests per month free, always), but with all that power there’s a an admin UI that’s, uh, yuck.

If you’re a Windows user however, you might find Azure a better option. I know basically jack about Azure except they have pretty similar feature parity to AWS, and that they have pretty slick integration in VSCode among other things.

Anywho, I’ve rambled on enough and am tired, so I trust you’ll Google all the things with capital letters rather than make me linkify them, si? :face_with_monocle:

Due to the fact App Engine can scale to zero, where you have 0 instances running by default, you could never pay. This of course means when going to your instance it will need to boot up from nothing, which will be very slow (20-30 seconds) but this should be acceptable if your just trying things out :slight_smile: