I am running multiple instance of MySQL using docker. I was planing to use nginx as reverse proxy server, I want assign public IP to each instance so I can map public ip to my docker networking,is this possible ?
I am running multiple instance of MySQL using docker. I was planing to use nginx as reverse proxy server, I want assign public IP to each instance so I can map public ip to my docker networking,is this possible ?
You might want to use consul with registry part, since Consul offers you a DNS server for all registered instances : https://www.consul.io/docs/agent/dns.html
More or less that means, the docker instances register with consul, and consul can resolve them also for extern services. This will though required you to have more then one public IP.
If you want only one public ip, you obviously want to load balance mysql, since TCP connections cannot be "routed" by path / domain. That said, you can use consul as service-discovery and tiller+consul backend to generate you nginx configuration for the upstream, listing all the current available servers