DEV Community

Mathew Chan
Mathew Chan

Posted on

Budget Cloud Resources for Hobbyists

Background

I'm currently running the following projects:

  • Python Twitch Bot
  • Python Flask Webapp to provide full-text search for 200k documents
  • Next JS Frontend that consumes the API from my web apps
  • Desktop App Documentation Website
  • NocoDB as CMS for document and media collaboration

There are many budget cloud services out there, but I decided to go with the ones that are easy to use and have predictable pricing. After all I'm interested in mostly developing my apps, not maintaining servers or managing Kubernetes.

Disclaimer: I'm not affiliated with or sponsored by any companies mentioned in this post.

Python Anywhere (PA)

image

This is where I host my Python webapps. The biggest draw is its ease of use but for me the most important thing is 3 GB RAM even for the cheapest Hacker plan ($5/month).

If you contact them through email, you can even pay upfront yearly to have 2 months off (which translates to ~$4.2/month!)

Other Pros:

  • No hard limit on data outbound/inbound
  • Almost everything you need for your Python work including notebooks, online consoles, background tasks, and server logs.

Cons:

  • Have to wait for PA (Python Anywhere) to update their Disk image for Python dependencies.
  • No support for Starlette and Fast API at the time of this writing
  • Hacker plan only offers 1GB of storage. For an extra dollar/month you can get 4GB of extra storage. Storage seems to be the most expensive on this platform.

Workflow

After I select the web app template (Flask/Django/Bottle), I just add a git remote to Github/Bitbucket and I can directly pull the changes from my repo to the server. I still have to press the restart server on the website or use their API after I git pull.

Digital Ocean (DO)

image

On the other hand, I can configure DO instances with any language or framework using Docker containers. This is where I plan to host my Fast API server in the coming future.

Pricing starts at $5/month as well with 25 GB of storage but only 1 GB of RAM. Storage is a lot cheaper on DO but RAM is expensive ($10/m for 2 GB and $20/m for 4 GB) so depending on how much memory and storage your app needs you should decide whether you want to host on PA or DO.

Workflow

Setting up servers on DO takes a bit more time with proxies, domains, and SSH certificates but Dokku makes the process much faster.

Also, with Dokku I can set up git-based deployments so I can directly push changes to the server and trigger a redeploy making it an ever faster experience similar to Heroku.

Digital Ocean Spaces

image

I use Digital Ocean Spaces for my storage at $5/month for 250 GB.

There are free storage options out there such as Scaleway (75 GB free!) but I haven't tried that out yet.

The CDN in DO Spaces is fast and using an S3 client like Cyberduck makes it easy to manage my media files.

Netlify

image

This is where I host my app documentation website generated with MkDocs for free. Setting up the build command for the MkDocs site can be done by just adding a netlify.toml config file with three lines.



[build]
  command = "mkdocs build"
  publish = "site"


Enter fullscreen mode Exit fullscreen mode

Git-based Workflow

I only need to select my Github/Bitbucket repo on the platform and I can trigger builds by pushes to any branch.

Vercel

image

This is where I host my Next JS app that consumes the Python API. Generous serverless function quotas and native support for Next JS apps here is great.

I've tried hosting Next JS apps on Netlify but there are some issues with client side fetching when reloading web pages. Maybe this will be resolved in the future but it will always lag behind Vercel when it comes to deploying Next JS apps.

Git-based Workflow

This works the same as Netlify: select my Github/Bitbucket repo on the platform and trigger redeploys by git pushes.

Railway

image

Railway is a new cloud provider. They've changed their pricing recently but their template apps are super easy to deploy with a single click.

I'm hosting a NocoDB with a PostgreSQL database as well as an Umami analytics platform (with another Postgres DB) for my website.

Pricing is based on usage, but there is a $5 free quota which is plenty for a single small app. I also found it to be the cheapest way to host a Redis store as managed Redis on even DO starts at $15/month with only 0.5 GB of RAM...

At the time of this writing, I receive a daily email of how much they estimate I would need to pay this month as well as how much I've spent so far. I can also check the numbers on my dashboard so that's reassuring. Service stops once the credit is exhausted which is not ideal for mission critical services, but for me I prefer that over getting hefty and shocking cloud bills.

What I have stopped using

image

MongoDB Atlas

After mLab was purchased by MongoDB Cloud, I had to switch my Mongo database to Atlas and the connection of my Python app seems to keep getting timed out because it was a shared cluster which never happened when I was using mLab.

I think I will just use Railway to host my Mongo databases for the time being.

Ending Thoughts

Cloud bills can easily rack up and having read horror stories of people's AWS or GCP bills, I've decided to go with monthly/annual plans, with Railway being the only exception for now.

Top comments (1)

Collapse
 
bhav profile image
Bhavesh Kakwani

Wonder if you have tried deta.sh as well? Would like to hear your thoughts on it if you have! I am considering it for a next project