There are several use-cases where the 3DS Server Admin application needs to connect to the active 3DS Server instances. One scenario is to notify the 3DS Server instances that the configuration needs to be reloaded. From the configuration tab, the 3DS Server Admin application can update a domain configuration table. After the configuration is validated it can be applied to the 3DS Server instances.
Other scenario is to fetch statistical data from each individual instance.
Service Discovery is the process of one service dynamically discovering the network location of another service to communicate with it. Using Service Discovery is beneficial because it allows more dynamic way of adding or removing instances, without the need of the Admin to be restarted. The Service Registry is a key part of Service Discovery. It is a database containing the network locations of service instances.
A Service Registry needs to be highly available and up to date. Clients can cache network locations obtained from the Service Registry. This makes the application highly scalable.
Netflix Eureka is used as a Service Discovery implementation. This library provides an implementation for a Service Discovery Client and Service Registry.
Eureka is a REST (Representational State Transfer) based service that is primarily used for locating services for the purpose of load balancing and failover of middle-tier servers. Netflix Eureka is built for high availability.
Netflix Eureka architecture consists of two components, the Server and the Client.
The Server is a standalone application. It is responsible for:
The Client is part of the Service Instance ecosystem. It is responsible for:
The 3DS Server Admin application comes with a packaged Eureka Server (Discovery Server) and can be started as part of the application. Another option is to use a standalone Eureka Server and configure the 3DS Server Admin and 3DS Server to use that. Each 3DS Server instance registers itself in the Eureka Server upon start up, providing metadata about itself, such as host, port and other details.
The 3DS Server instance send heartbeat messages. Eureka Server expects these heartbeat messages in order to keep the instance in the Registry from expiring, otherwise the instance is removed from the Registry.
The 3DSS Admin retrieves a list of all connected 3DS Server instances from the Service Registry (Eureka Server) and can make remote calls to them, e.g. 'Reload configuration'.
Configuring Eureka Client on the 3DS Server and Service Registry on the 3DS Server Admin application can be done in the application.properties file for each application. You can find more information in the Configuration Properties page and the Admin Configuration Properties for the applications.
On 'Validate and reload configuration', the 3DSS Admin app firstly validates the new / updated configuration and then makes remote calls to each registered 3DS Server instance, to reload the configuration. The 3DSS Admin retrieves a list of all connected 3DS Server instances from the Eureka Server (Service Registry). If none is registered a warning message is displayed.