Hosting options to deploy a Ruby app

You want to deploy your a small app or you’re working on your portfolio and need to get it deployed somewhere quickly, but you’re still deciding what PAAS provider to use, below you’ll find different providers so you can choose the best option for you.

I selected the 3 most popular options and compare them using the following requirements:

  • Always on instances

  • RAM: 500MB

  • CPU: 1x - shared

  • Database: Cheapest available

All of the selected providers offer the following features:

  • Quick setup and deployment of your application

  • Built in metrics dashboards, logging basics, and standard machine health checks

  • CLI to manage and configure your applications from the CLI

  • SSL certificates and domain configuration (out of the box)

  • Security and updates of your servers and applications.

Heroku

Pros

  • Generally easy to use.

  • Build-packs allow you to push your code and the platform takes care of the rest.

  • Reliable and familiar, it’s been around for 15 years.

Cons

  • No free trial.

  • Price can scale quickly if you need to deploy multiple apps or need more resources.

  • Salesforce announced recently that it’s going into a “sustaining engineering model”.

Monthly pricing

  • 1 app - $13 ($7 compute + $5 storage)

  • 3 apps - $36 ($21 compute + $15 storage)

Documentation

Fly

Pros

  • Option to use a SQLite database to get started.

  • Pricing based on usage and 40% discount when you reserve compute in advance.

  • Deployment based on Dockerfile, making it easier to switch to a different provider if needed.

  • Provides more fine-grained controls for scaling horizontally and vertically (RAM, CPU, storage, regions, etc).

Cons

  • No cheap/basic managed Postgres database.

  • Additional charges for data transfer (Bandwidth).

  • Flexibility makes configuration more complex, so you’ll need to work with extra concepts.

Monthly pricing

  • 1 app - $6.15 ($4 compute + $2 bandwidth + $.15 storage)

  • 3 apps - $18.45 ($12 compute + $6 bandwidth + $.45 storage)

Documentation

Render

Pros

  • Same philosophy, cost structure and concepts as Heroku but cheaper as you scale

  • Offers native, fully customizable cron jobs.

  • Native support for Docker, you can deploy using a Dockerfile in your repository.

Cons

  • Basic database only has 256mb of storage and 256MB of RAM.

  • Price can scale quickly if you need to deploy multiple apps or need more resources.

  • Documentation is a bit difficult to navigate.

Monthly pricing

  • 1 app - $13 ($7 compute + $6 storage)

  • 3 apps - $39 ($21 compute + $18 storage)

Documentation

If you find this information helpful, please share it with others. Any feedback or experiences deploying apps to these SaaS providers is welcomed too.

Very happy with Hetzner + Miren (https://miren.dev/). Cheap VMs and affordable dedicated servers (comparable in price to much weaker “performance” VMs for most PaaS solutions).

1 Like

Thanks for the suggestion @rkh ! I have Miren in sight but haven’t had the time to test it yet. For self-hosting I’ve also heard good things about https://hatchbox.io

A comment about Fly, as a user for a year:

  • If your bill is under $5, you get 100% discount. I have been going on like this with a single app for this whole time, although this is not a Rails app and I keep the database on Supabase free tier.
  • Fly actually does offer managed Postgres, although it not full-featured
  • In general, Fly positions itself as a public cloud, not a PaaS, so it’s expected you have to do more work yourself and their offering is closer to bare metal, compared to Heroku or Render. This will be good for some people, bad for some other.
2 Likes

@katafrakt Thanks for sharing your experience and insights. I agree with you that the best option will depend on multiple factors and it won’t be the same for everyone.

Was using Heroku and then move to Fly for better pricing.
Now I’ve been playing with Hetzner and Kamal 2, thinking about to move everything out to Hetzner. The only thing that makes me hesitate is the managed postgresql. The cost saving is insane.