Hello Fly folks, I’m trying to understand if my use case is supported and what the best practices are.
What I’m trying to do
We have a product that makes it very easy to create Node.js apps + SPA frontends locally. We want to create a cloud-hosted version where users can deploy these apps through our service with one click of a button. I am investigating if I can use Fly as the backend where we deploy these apps (seems way more fun than AWS :).
TLDR: we want to deploy N small apps dynamically on behalf of our users.
What I want to know
- Is this a supported use case?
- What, if any, limits are there? Can we spin up tens of 1000s of apps? More? Is there a ceiling?
- Are there recommended ways to handle billing in these cases? If each end-user app is also a Fly app, is there an API where I can get the billing details for each app individually?
- What other challenges or gotchyas should I be aware of for this use case?
Rough architecture plan
Does the following sound right? Are there best practices I’m missing?
- We create a Fly app in our Fly organization for each app created by one of our end-users.
- The Fly app has its own custom network to be isolated from other end-user apps (later, we can also assign custom domains to these apps)
- We can spin up N machines or other resources under this app, though most deployments will probably have the lowest tier shared CPU etc to start. We autoscale it to 0 when it’s not in use to avoid consuming unused resources and reduce charges.
- We charge our end-users by adding up the cost of all the apps they deployed.
- We use the REST API to implement the above programmatically
Anything else I should know?
Thank you