I currently have a single dedicated machine hosting my MySQL instance and I'm looking at moving to a Master/Slave replication setup. I've configured a test master and slave as per the usual tutorials and it works fine. However, my application runs on AWS using a Load Balancer and Auto-Scaling etc... So new instances are added and removed. Each of these will have a local MySQL instance for reads. Can I configure the "server-id" in my.cnf to auto-assign? If not how would I do this with a dynamically sizing set of slave nodes?
Thanks
When you're using Auto Scaling, then you should move your database off the Auto Scaled instances. Each Auto Scaled instance should not have it's own copy of the database.
Instead:
This way, as EC2 instances scale up/down/in/out, your database stays put separated from those instances.