Back to blog
July 18, 2023

SaasRock 0.9.0 - Switching from Vercel to Fly.io

  • Name
    Alexandro Martínez
    #deployment
    #release
SaasRock 0.9.0 - Switching from Vercel to Fly.io

Screenshot 2023-07-18 at 14.31.34.png

Why switching?

Before you keep reading: I will specifically talk about Remix apps built on top of saasrock.

Thanks to @ebm for posting a discussion on how to deploy to fly.

Vercel is fantastic, look at how many apps I have deployed there:

image.png

Reason #1: Cold Starts

But there's one main problem, COLD STARTS. I think Vercel + Prisma is the combination that causes this problem, and I believe they have already fixed it with Vercel Edge Functions.


Reason #2: Speed

Now, in terms of speed, so far I've tested Vercel, Render, and now Fly.io. Here's a comparison table I created for a client.

Screenshot 2023-07-18 at 1.46.10.png

I always keep the Hosting and Database regions as close as possible. And I'm excited to experiment with Fly Postgres Clusters in an effort to further enhance performance across multiple regions.


Reason #3: Timeouts

Also, the 60-second limit (in my Vercel Pro plan) also limits some features, such as an integration process that may take up to 2 minutes, which leads to timeouts:

YouTube Channel Art (2).png

I even created hacky ways to run long-running processes, just check out this demo: https://tools.saasrock.com/long-running-tasks.

If you're curious, these are the deployment URLs.


Deploying your app to Fly.io

Read this article to learn how to deploy your app to Fly.io.

The latest release, v0.9.0, has the following configuration files so the deployment process is now easy.

  • Dockerfile

  • start.sh

  • fly.toml

If you don't scale your app, you may get crashes like the following, consider scaling to shared-cpu-2x, shared-cpu-4x, shared-cpu-8x... depending on your use case:

Screenshot 2023-07-18 at 14.31.34.png

We respect your privacy.

TLDR: We use cookies for language selection, theme, and analytics. Learn more.