Reinstantiate in Load Balancer Environment

We have a situation where our EC2 instances running on ColdFusion is currently behind an AWS Load Balancer. I would like to get some suggestion on how we could reinstantiate the coldbox frameworks within the application without having to go into the server a restarting the ColdFusion service. The issue is when we use “?fwreinit” the the command could be reinstantiating any one of the multiple instances behind the firewall. We tried reinstantiating the code directly by creating a domain that hits the instance directly. However, that method only works for that domain. The fwinit does not work for the domain through the load balancer. Any tips or suggestions would be much appreciated.

@jsjung The ideal scenario is to never need to reinit. Take docker for example-- a new code push is a new container. Once a container deploys-- it’s locked into that snapshot in time forever until it’s stopped.

I don’t quite understand why you’re saying your domain won’t work. That’s the approach I’ve always taken. i.e. www.site.com is the main load balanced domain and then www1.site.com, www2.site.com, and www3.site.com point to servers 1, 2, and 3. I’ve done this many times with on-prem load balancer appliances like an F5, etc but I don’t know what the equiv is in AWS.

The other solution if you want to automate it without having a DNS route to each server or if you have an unknown dynamic number of servers is to use a module like this which insatlls into each site and checks a file for a timestamp and then auto-reinits itself when the timestamp changes. Usually as the result of a code deployment.

https://www.forgebox.io/view/autodeploy

@bdw429s Thank you for the response.I will try ForgeBox: AutoDeploy and let you know.