4 ms·
It is an interesting proposal. It starts to fall over when you have, for example a MySQL slave that needs to connect to a MySQL master. But now the listening s
by dsl 13y ago
It is an interesting proposal.
It starts to fall over when you have, for example a MySQL slave that needs to connect to a MySQL master. But now the listening slave on 3306 is trying to connect to localhost:3306.
I would strongly recommend that the CoreOS team reach out to ARIN (the IANA operator) to get a special use /24 assigned for these "magic addresses" and not hijack 127.0.0.0/8.
- polvi 13y agoYou'd actually setup it all up as you would if everything was on your localhost or dev environment. Meaning you'd need your master on 3306, slave1 on 3307, slave2 on 3308, etc. You'd still need to setup a configuration for each of these services, pointing to one another, but the configuration would be fixed.
- dsl 13y agoThat seems sloppy when you could just stick to standard port assignments and use special use addresses. If you'd like help getting special use addresses, I'd be happy to help where I can. At the minimum, hijack 255.255.255.255 instead.
- polvi 13y agoOK. We'd love to get your help getting a special use address: alex.polvi@coreos.com
- vishvananda 13y agoThis is true if the application needs to talk to the slaves directly. If the application doesn't care, then you could do the smarts in the proxy layer underneath the application. I see three scenarios: * Stateless or Transparent master/master backend Example: Memcached cluster Use load balancing in the proxy layer * Failover backend with failover on server side Examples: Mysql master/slave Use failover logic in the proxy layer * Failover backend with failover on the client side Example: HA RabbitMQ cluster Above suggestion from polvi is needed
- emmelaich 13y agoI don't know how much it helps, but you can just listen on other ips on localnet, with no need to plumb e.g. nc -l 127.0.0.2 9999 Then "all" you need to something to map the 127.0.0.n against the docker instance. This even works on windows by the way. Just start up that second tomcat or whatever with the next 127.0.0.n address and enjoy.
- justincormack 13y agoOr just register your own ipv6 private /48 here https://www.sixxs.net/tools/grh/ula/ https://www.sixxs.net/tools/grh/ula/ and use that
- philjr 13y agoI agree that hijacking 127.0.0.1 is not a good idea, but don't see any issues with picking something else in 127.0.0.0/8? In fact it seems like a perfect use-case for that