superfly / fly

Deploy app servers close to your users. Package your app as a Docker image, and launch it in 17 cities with one simple CLI.
https://fly.io
985 stars 48 forks source link

Proposal: Multiple apps through static config #150

Closed jeromegn closed 5 years ago

jeromegn commented 6 years ago

There are plans in motion to completely open sourcing fly. Including the, currently closed source, code we use to run multiple apps on the same server.

Right now we use service discovery via a replicated database to store all the apps we can run in our service. This is not practical for running multiple apps locally.

This is a proposal to allow using a static configuration file (think haproxy or maybe nginx) to run multiple apps, including simple rules for routing requests to specific apps.

There are a few things to consider:

Discussions warmly welcomed!

mrkurt commented 6 years ago

This would be super useful for #142.

We should probably build routing by IP / block or SNI in at some point, it wouldn't be hard to support hosting for that.

The routing + app configs seem like they could work equally well in a file system or etcd/redis/shared storage.

michaeldwan commented 6 years ago

I had to fake this in #152 by monkey patching the networking apis. Native support would be much better.