Is Fly.io Suitable for a Multi-Tenant On-Demand App Deployment Platform?

I’m building a platform where users can run their own code, and when they decide to deploy, they automatically get a dedicated database, AI integration, email system, authentication, analytics, storage, and payment processing.

Each user gets hosting with a subdomain (e.g., user.myplatform.com) and can connect a custom domain.

Would Fly.io be a good fit for this? Specifically:

Can I implement this using Fly.io? If so, how would I manage on-demand deployments for each user’s app while provisioning all the specified resources? Or is it better to look for a more customized solution for this use case?

Looking for recommendations on the best approach. Thanks!

Does this help: Per-User Dev Environments with Fly Machines · Fly Docs ?

Yes, you can do those things on Fly. You’d have to decide whether the Fly way of doing things suits your technical vision.

In my opinion, Fly is like a Lego set for cloud engineers. It’s a bit lower-level than AWS or GCP; if you want resiliency then other cloud providers will sell you a resilient product, but here you build it yourself, using machine (container) primitives. I really like that, but it is not for everyone.

There is API control for pretty much every Fly operation. You can create and delete machines at will, and they start extremely quickly.

However, data volumes are tricky; they are essentially SSD drives on a physical host, and they are not network drives, they are not RAID, and they are not redundant. So you need to think about mirroring/syncing automatically, or using an external object storage provider.

You can manage your own database cluster on Fly, but you have to know how to handle individual host/hardware failure. Thankfully Fly are starting to offer managed databases though, and of course external database providers are available.

If you were to build this on, say, AWS, then you could have a big EC2 and parcel it up into Docker containers for your users, or you could use Fargate, where AWS manages containers for you. That would work, and AWS have been around for longer, so it would probably be a bit more stable, but I would wager it would be rather more expensive to run.

Ultimately you’re going to have to try a few platforms for yourself. An excellent approach is to have a core product that runs in Docker, and then a driver system that lets you run your product in different environments; I am doing just that for my own project. All my tests run in Docker mode, so it starts containers, kills containers, lists containers, fetchers container logs, etc. In Fly mode it will do all the same using Fly calls instead of Docker calls, and in your case you could include any other provider you would like to test.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.