Skip to content

Discovery Service Operation#

The Critical Manufacturing Discovery Service is a high-availability component that runs as a Windows Service on a Windows Server Failover Clustering (WSFC). If a WSFC cluster node fails, the discovery service that was hosted on that node will be automatically transferred to another available node, in a process known as fail-over, thus providing service continuity for the client application.

Upon startup, clients make a service call to the Discovery Service using the Windows Server Failover Cluster address in order to retrieve the Routing Table definitions which then will be stored in memory locally as shown in the figure below.

Discovery Service - Service call

After the desired Application Services are chosen by the end user, all client requests are made routed to an Application Server based on a weighted round-robin scheduling algorithm, taking into account the configured Application Server weights, as shown in the below figure. For example, if a server has been assigned a weight of 20%, then 4 out of 5 requests will be sent to that server.

This algorithm is implemented and managed by the light business objects client library. This ensures that no extra logic is required on the client side. Moreover, the system will have a standard behavior regardless of the client application or service type.

Discovery Service - Client request

The Critical Manufacturing Discovery Service periodically checks for the responsiveness of the active Application Servers, and removes from the routing table any Application Servers that is unresponsive. In addition, Application Servers can be manually marked as active or inactive at any time simplifying the execution of maintenance activities without disturbing the normal MES System operations.

Clients are continuously listening to an administration subject (UDP protocol) and whenever there is a change on the routing table, the system broadcasts an invalidation message triggering a refresh of client’s local routing table as illustrated in the next figure.

Discovery Service - Routing table

Critical Manufacturing Discovery Service is crucial when it comes to balance the requests between the client and the server. A simplified example of this interaction is shown in the next figure, which aims to summarize the main processes explained above, between the client and the discovery service.

Discovery Service - Sequence diagram

After being able to identify all available application servers, the client sends requests without having to worry about the load balancing. The Weighted Round-Robin algorithm is responsible for this load balancing, in order to analyze and choose the best application server, based on its performance. Moreover, the Critical Manufacturing Discovery Service periodically checks for the application server’s status, so that, in case of failure, a fast response can be given to maintain the infrastructure’s high-availability. This response is based on the Discovery Service being transferred to any other available node, broadcasting an invalidation message and, subsequently, updating the routing table with all available application servers.