Configuring a reverse proxy for Ruby application

Not familiar with Ruby/Puma (there are others on the forum who are, may be they’ll reply), but typically one won’t really need a reverse proxy in front of their Fly app.

You can setup a different Fly app just to run Ngnix but that’s only making your architecture a bit complicated. I’d avoid it, if I can.

  1. That said, the idiomatic way to run Ngnix as a separate app is via multi-process Fly apps. Each process of a multi-process Fly app gets its own VM, and can be scaled independently of other processes. Caveat: This feature has been ‘in preview’ since time immemorial.

  2. Another way is via multi-process Fly machines, which runs all declared processes in the same VM. Caveat: Pretty raw and new, but I’d prefer it over other solutions listed here.

  3. Or, run multiple processes in a Fly app yourself, with the help of process supervisor like overmind or s6.

1 Like