I am wondering how I can dynamically increase and decrease the number of varnish instances for a Magento2 installation as needed - with an aws autoscaling group, for example.
Configuring them from the client side is easy: I can just use a load balancer. But Magento2 also needs to be aware of each instance, and this seems to be a bit more tricky. Updating the configuration file would require an app:config:import, which is a bit of a hassle in a production multi-server environment.
The Magento documentation suggests this command:
magento setup:config:set --http-cache-hosts=192.0.2.100,192.0.2.155:6081
(https://devdocs.magento.com/guides/v2.2/config-guide/varnish/use-multiple-varnish-cache.html)
Is it an appropriate way to update the varnish servers continuously in an operational / live / production system?