I am ready to implement an autoscale server farm for 'webapps' to handle traffic spikes and had a question.
The plan is to create an ELB which will forward traffic across multiple availability zones. Right now I am specifying servers individually in the upstream section of my nginx vhost confs, but I was thinking it may be better to create a CNAME record which points to the DNS record of the internal ELB which will dole out the requests to the servers in the autoscale farm, this way I don't have mess with updating the nginx+ config file, so instead of:
upstream mothership {
zone heartbeat_mothership 64k;
server app-a-1:51000 slow_start=20s;
server app-a-2:51000 slow_start=20s;
server app-a-3:51000 slow_start=20s;
}
I can do:
upstream mothership {
zone heartbeat_mothership 64k;
internal-lb1:51000; # CNAME to AWS ELB which monitors port 51000 of servers in autoscale farm spread across multiple AZ
}
Or do I have to go into weeds in setting up a script via AWS SDK as mentioned in other online articles?