I am currently running my Laravel application on AWS Beanstalk with a load balancer configured. The setup allows for a minimum of 1 and a maximum of 2 instances to be running. So far, everything functions as expected, with the load balancer adding a second instance when the load on the first one becomes too high.
However, my concern arises when the second instance gets terminated. In my .platform configuration, the supervisor is set up and consequently, the second instance also starts running the workers. What will happen to these workers that are still processing jobs when their instance gets terminated? Would it be more feasible to separate the workers into another instance?
Unfortunately, I have not been able to test or replicate this situation. However, my assumption is that the system should wait for the supervisor to complete its processes before terminating the instance.