When Eureka either accepts an instance registration or offers an instance record back from a query by instance ID, application, or VIP address, the per-instance data structure exchanged describes two ports—the unadorned insecure port, and a secure port—both of which can be either enabled or disabled. The insecure port is enabled by default; the secure port is disabled by default.
At present, fargo can parse the "enabled" field of the composite "port" value in the JSON representation, but it discards the value immediately afterward (see fargo.Instance.UnmarshalJSON). In the XML representation, the "port" element has an "enabled" attribute that fargo ignores completely. The consequence is twofold:
instance consumers can't determine whether a given port is enabled, and
instance registrants can't specify whether a given port is enabled.
Not all Eureka clients pay attention to this information, but today I confirmed that Ribbon does. I've seen a few other clients that also check whether the secure port is enabled (apparently not caring whether the insecure port is disabled).
Given that fargo already defines the fargo.Instance.PortJ and fargo.Instance.SecurePortJ fields, I'd like to see if we can augment the marshaling procedures to preserve the port's enabled/disabled status round-trip through both the XML and JSON representations. Doing so would be mostly backward compatible, though registrants that were setting the fargo.Instance.PortJ.Enabled and fargo.Instance.SecurePortJ.Enabled field values to false or true respectively would find those values now being sent to the server—likely as originally intended.
When Eureka either accepts an instance registration or offers an instance record back from a query by instance ID, application, or VIP address, the per-instance data structure exchanged describes two ports—the unadorned insecure port, and a secure port—both of which can be either enabled or disabled. The insecure port is enabled by default; the secure port is disabled by default.
At present, fargo can parse the "enabled" field of the composite "port" value in the JSON representation, but it discards the value immediately afterward (see
fargo.Instance.UnmarshalJSON
). In the XML representation, the "port" element has an "enabled" attribute that fargo ignores completely. The consequence is twofold:Not all Eureka clients pay attention to this information, but today I confirmed that Ribbon does. I've seen a few other clients that also check whether the secure port is enabled (apparently not caring whether the insecure port is disabled).
Given that fargo already defines the
fargo.Instance.PortJ
andfargo.Instance.SecurePortJ
fields, I'd like to see if we can augment the marshaling procedures to preserve the port's enabled/disabled status round-trip through both the XML and JSON representations. Doing so would be mostly backward compatible, though registrants that were setting thefargo.Instance.PortJ.Enabled
andfargo.Instance.SecurePortJ.Enabled
field values to false or true respectively would find those values now being sent to the server—likely as originally intended.