Right now I’m running on AWS with the following setup:
- Route53
- ELB
- EC2 (Nginx / Elixir App)
- Aurora (PostgreSQL)
Right now this is managed by Terraform, and really overall is just a bit too complicated for my needs, especially if I want to start scaling.
I’m wondering what the best approach is for structuring apps in Fly. One requirement I have is that everything lives under the same domian (here is our current setup:
- mysite.com/info (nginx reverse proxy to a netlify app)
-
mysite.com/blog (nginx reverse proxy to an AWS hosted wordpress blog)
- This includes locations for wp-admin, and other WP specific things.
- mysite.com/* A Phoenix / LiveView app.
Moving the blog and info routes to a subdomain is not an option for me unfortunately.
Here is the root of my question:
Should I have a separate Nginx Fly app that only serves as the reverse proxy, and then forward traffic to a separate fly app running the Elixir code? Or should I attempt to pack both into one container, and run them together?
I’m leaning towards separate apps, as I think it makes more sense, and is less complicated to maintain. My main worry is if the internal DNS resolution is capable of load balancing appropriately, especially during rolling redeploys.
One of my main reasons for moving to Fly is to make scaling, and zero downtime deploys easy.