You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently eureka provides a way to get registry information from a remote aws region.
However, the behavior of this is not controllable by the user.
The instances from the remote region is added to the local registry only if the application, the instance belongs to, is not already available locally.
This change should allow users to retrieve instances for a specific region (via the eureka client).
The following setup would be required to achieve this:
Eureka Server
The eureka server which will get data from a remote region must create a property: eureka.remoteRegionUrlsWithName with the content as key value pairs separated by a comma. The key is the name of the region and value is the http(s) url to the eureka server in the remote region. This will deprecate the existing property: eureka.remoteRegionUrls which does not have any insight into which region the URL belongs to.
Optionally provide a whitelist of applications, per region (or global) which will restrict only a certain set of applications to be retrieved from a remote region. The retrieval here is referred to as the API view of the remote registry. The server internally will fetch the entire remote registry. The whitelist follows the property name: eureka.remoteRegion.[region_name].appWhiteList, where [region_name] can either be the string "global" or the name of the region (must match with what is provided in 1 above). The value is a comma separated list of app names. The global list is only consulted when there is no whitelist for the specific region. In absence of any whitelist all instances from the remote region will be retrieved.
Client
Define a property: eureka.fetchRemoteRegionsRegistry with the value as comma separated list of regions from which this client should fetch the registry information. This obviously requires that the server actually is pulling data from those regions.
For each remote region that the client need to fetch, define a property: "eureka.[region_name].availabilityZones" containing a comma separated list of all availability zones in the region. This is to reverse map, the availability zones (available as instance metadata) in eureka server registry response. Since, this mapping is static, it adds little value to add the extra parameter region in all the instance information. We can possibly infer this from availability zone, i.e. us-west-1c is in region us-west-1 but this is more or less to externalize this logic rather than bake in the code.
Use the methods in DiscoveryClient to get instances for a specific region. In absence of a region, the client will fetch instances from the local region only.
Caveat
If the client choose this mode of fetching instances, it can not go back to the previous way of getting remote region instances i.e. only applications that are not available locally will be fetched from remote region without the client knowing about it.
The text was updated successfully, but these errors were encountered:
Currently eureka provides a way to get registry information from a remote aws region.
However, the behavior of this is not controllable by the user.
The instances from the remote region is added to the local registry only if the application, the instance belongs to, is not already available locally.
This change should allow users to retrieve instances for a specific region (via the eureka client).
The following setup would be required to achieve this:
Eureka Server
Client
Caveat
If the client choose this mode of fetching instances, it can not go back to the previous way of getting remote region instances i.e. only applications that are not available locally will be fetched from remote region without the client knowing about it.
The text was updated successfully, but these errors were encountered: