[SERVER-12314] Warn when config servers are IP addresses Created: 10/Jan/14  Updated: 25/Jun/15  Resolved: 06/Mar/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kevin Pulo Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-11128 Warn about configurations involving I... Closed
Related
Participants:

 Description   

There is no good production use case for having config servers which are IP addresses, since any eventuality which causes any of the IP addresses to change requires downtime. As such, we should issue a warning whenever a config string is encountered that contains an IP address.



 Comments   
Comment by Kevin Pulo [ 13/Jan/14 ]

Of course, VIPs, IP aliases, Elastic IPs and so forth can be used, where possible/available. Given sufficient care, it's also possible to mix localhost and non-localhost addresses - yet that is expressly forbidden. This isn't about "server knows best", this is just a request for a simple startup warning in mongos along the lines of "Warning: config server string contains IP addresses. Consider using hostnames instead.".

Load balancers are easy to misconfigure, since they are primarily intended for HTTP traffic. Certainly no-one should ever be using load balancers in front of config servers (even though the heavily asymmetric load on config servers means that users may be enticed to try).

These solutions are all more complex than using hostname resolution (whether by DNS or /etc/hosts), which is a well-established, well-understood solution that was designed from the outset to address this exact problem (among others).

Most users are surprised to learn that simple string comparison is used on the config servers to determine same-ness, and that eg. "foo:27017,bar:27017,baz:27017" would be considered different to "foo.example.com:27017,bar.example.com:27017,baz.example.com:27017", even though the actual servers might be the same (much less switching between IPs and hostnames).

Comment by Scott Hernandez (Inactive) [ 10/Jan/14 ]

It is possible to use a VIP and as such your assertion is not strictly true, and will be problematic for others. There are plenty of people using load-balancers and other network hardware which virtualize/abstracts the IP from the host much like using an alias (dns cname/a record).

Deciding that the server knows best in this case is very questionable, and might cause even more confusion for those following their networking best practices internally which use ip addresses.

Generated at Thu Feb 08 03:28:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.