Redundant Microservice Registries

Automatic load balancing and automatic discovery of microservices are important features in . The microservice registry is responsible for both services. This makes it an important heart of the network. In the event of a failure of the node on which the microservice registry was installed, a central part of the network would fail.

To address this risk, the microservice registry was made redundant. Microservice registries can be installed on multiple nodes. When a microservice is registered, the other instances are informed about it, as well as when a microservice is dropped. If a new registry is added, all entries are synchronized on registered microservices.

Microservice registries inform all nodes of their existence via network broadcasts at startup. Likewise, all newly added nodes will be notified of this.

Local microservice helper services

To make the registration of microservices easy, a local helper is installed as a plugin in each node. The local helper services collect the information about available registries.

If a locally installed service requires a microservice registry (e.g. if a message is to be sent to an as yet unknown microservice), the helper is prompted by the system for a registry. The Helper Service then searches for the nearest registry. To do this, it uses the knowledge of the router service, which knows the entire network. In this way, the message can be sent to the next registry.

If a microservice is installed when a node is booted, there may not yet be local knowledge of microservice registries. However, the helper already accepts the registration data. If the broadcast of a registry enters the system, the helper then performs the registration of the local microservice itself. This way it is not necessary that a target waits for the broadcast.

The Helper can also provide lists of microservice registries. A listener pattern is also supported so that interested targets can be notified of registries being registered or dropped.

Sending messages to microservices

Microservices are identified by an ID. The ID can be a numeric value, a string or a UUID.

Messages can be sent to a microservice very easily. Only the ID of the microservice needs to be placed in the envelope of a message. The system takes over the resolution automatically.

If there are multiple instances of the same microservice, one instance is selected by the system (load balancing).

If a response is requested (which is usually the case), the response envelope also contains the target address of the microservice. The requester can now use this address to address the microservice directly without going via the registry. If an error occurs in the process (e.g. because the microservices node has been terminated), it is again free to use a registry. is the nicer net