I have a stack of 2 AWS instances running 3 servers in a chain:
- (Server 1) Apache2 and PHP-FPM
- (Server 2) Varnish + Nginx for SSL termination
These servers are separate as I expect the Apache Server to be CPU bound, the other server to be memory bound.
I now want to make use of auto scaling for reduncancy and cost efficiency. A shared EFS file system will hold website files as well as configuration as suggested here https://serverfault.com/a/933566/81774 Server configuration is already managed with Ansible.
Currently I am leaning towards using a network load balancer to eliminate the need to map 25 SSL certificates each onto a load balancer.
I cannot find a way documented to launch multiple servers as part of auto scaling, so that my stack of 2 servers is recreated when scaling up or on failure.
if there is no such way, am I better off:
a) Combining the 2 instances into one with the risk of memory being competed over by Varnish and PHP
or
b) Creating a fixed number of SSL/Varnish servers that don't autoscale and only scale Apache servers.