Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
MESSAGE QUEUE PERFORMANCE MONITORING
Document Type and Number:
WIPO Patent Application WO/2018/199817
Kind Code:
A1
Abstract:
A processor implemented method for monitoring the performance of a message queue for communication between processes. The method comprises, by an initiating process, publishing a trigger message to a first topic in the message queue, wherein the trigger message identifies one or more performance metrics and at least two processes that communicate via the message queue. By one or more of said processes, retrieving the trigger message from the first topic in the message queue; performing a measurement on a message or messages exchanged between the processes over the message queue, wherein the measurement determines the one or more performance metrics; and publishing the one or more determined performance metrics to a second topic in the message queue. The method also comprises, at a receiving process, retrieving the published performance metrics from the second topic in the message queue.

Inventors:
MORADI FARNAZ (SE)
JOHN WOLFGANG (SE)
FLINTA CHRISTOFER (SE)
SKÖLDSTRÖM PONTUS (SE)
PECHENOT BERTRAND (SE)
Application Number:
PCT/SE2017/050402
Publication Date:
November 01, 2018
Filing Date:
April 24, 2017
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ERICSSON TELEFON AB L M (SE)
International Classes:
G06F9/54
Foreign References:
US20160269348A12016-09-15
US20170098162A12017-04-06
CN103389715A2013-11-13
US20080133337A12008-06-05
US8907074B22014-12-09
Other References:
K. WITTING ET AL: "Monitoring distributed systems: a publish/subscribe methodology and architecture", 8TH INTERNATIONAL SYMPOSIUM ON INTEGRATED NETWORK MANAGEMENT 24-28 MARCH 2003 COLORADO SPRINGS, CO, USA, 1 January 2003 (2003-01-01), pages 89 - 92, XP055445390, ISBN: 978-1-4020-7418-9, DOI: 10.1109/INM.2003.1194162
Attorney, Agent or Firm:
TELEFONAKTIEBOLAGET LM ERICSSON (PUBL) (SE)
Download PDF:
Claims:
CLAIMS:

1. A processor implemented method for monitoring the performance of a message queue for communication between processes, the method comprising:

by an initiating process, publishing a trigger message to a first topic in the message queue (S6, S106), wherein the trigger message identifies one or more performance metrics and at least two processes that communicate via the message queue;

by one or more of said processes:

retrieving the trigger message from the first topic in the message queue; performing a measurement on a message or messages exchanged between the processes over the message queue (S7, S107), wherein the measurement determines the one or more performance metrics; publishing the one or more determined performance metrics to a second topic in the message queue (S8, S108); and

at a receiving process, retrieving the published performance metrics from the second topic in the message queue (S9, S109).

2. A method according to claim 1 , wherein each process is a microservice of an application with a microservice architecture.

3. A method according to claim 2, wherein the application is a cloud application.

4. A method according to claim 1 , 2 or 3, wherein the processes are controlled by a management system and at least one of the initiating process and the receiving process is the management system.

5. A method according to anyone of the preceding claims, wherein the processes are controlled by a management system and the management system is one of the at least two processes identified by the trigger message.

6. A method according to anyone of the preceding claims, wherein the steps of retrieving the trigger message, performing a measurement, and publishing the one or more determined performance metrics, are carried out by an intelligent socket agent of the or each process.

7. A method according to anyone of the preceding claims, wherein the step of performing a measurement includes timestamping the message or messages exchanged between the processes.

8. A method according to claim 7, wherein at least two processes perform the measurement and each of said processes publishes a timestamp to the second topic, and the receiving process calculates the latency by taking the difference in time between the timestamps.

9. A method according to any one of the preceding claims, wherein the trigger message specifies one of active monitoring and passive monitoring.

10. A method according to any one of the preceding claims, wherein the one or more performance metrics comprise at least one of latency, message throughput, and message drop rate.

1 1. A method according to any one of the preceding claims and comprising, at the receiving process, analysing the one or more determined performance metrics to produce aggregated results, and publishing the aggregated results to the second topic or a third topic in the message queue.

12. A method according to claim 1 1 and comprising, by one or more processes and/or at the message queue and/or at one or more management systems, receiving the aggregated results from the message queue.

13. A method according to any one of the preceding claims and comprising storing the determined performance metrics by the or each process that performed the measurement.

14. A method according to any one of the preceding claims, wherein the processes are controlled by a management system, and comprising, at the management system, creating the first and second topics in the message queue. 15. A server or a plurality of connected servers comprising one or more processors configured to perform the method of any one of the preceding claims.

16. A system for monitoring the performance of a message queue (4) for communication between processes (6, 7), the system comprising:

an initiating process (2) configured to publish a trigger message to a first topic in the message queue (4), wherein the trigger message identifies one or more performance metrics and at least a first process (6) and a second process (7) that communicate via the message queue (4);

first and second processes (6, 7), of which at least one is configured to receive the trigger message from the first topic in the message queue (4), perform a measurement on a message or messages exchanged between the first and second processes (6, 7) over the message queue (4), wherein the measurement determines the one or more performance metrics; and publish the one or more determined performance metrics to the second topic in the message queue (4); and

a receiving process (2) configured to retrieve the published performance metrics from the second topic in the message queue (4).

17. A system according to claim 16, wherein each process is a microservice of an application with a microservice architecture. 18. A system according to claim 17, wherein the application is a cloud application.

19. A system according to claim 16, 17 or 18, wherein the processes are controlled by a management system and at least one of the initiating process and the receiving process is the management system.

20. A system according to any one of claims 16 to 19, wherein the processes are controlled by a management system and the management system is the first process or the second process. 21. A system according to any one of claims 16 to 20, wherein at least one of the first and second processes comprises an intelligent socket agent configured to receive the trigger message, perform the measurement and publish the one or more determined performance metrics. 22. A system according to any one of claims 16 to 21 , wherein the receiving process is configured to analyse the one or more determined performance metrics received from the second topic in the message queue to produce aggregated results, and to publish the aggregated results to the second topic or a third topic in the message queue 23. A system according to any one of claims 16 to 22, wherein the first process and/or the second process is configured to store the determined performance metrics.

24. A system according to any one of claims 16 to 23, wherein the processes are controlled by a management system and the management system is configured to create the first and second topics in the message queue.

25. A server or a plurality of connected servers comprising the system of any one of claims 16 to 24. 26. A computer program, comprising instructions which, when executed on at least one processor, cause the at least one processor to carry out the method according to any one of claims 1 to 14.

27. A carrier containing the computer program of claim 26, wherein the carrier is one of an electronic signal, optical signal, radio signal, or computer readable storage medium.

Description:
MESSAGE QUEUE PERFORMANCE MONITORING

Technical field The invention relates to message queue performance monitoring. Background

Cloud applications can be implemented with a microservice architecture. In a microservice architecture, applications consist of many small, highly optimized, and independent processes (microservices or microservice applications) that communicate with each other to form complex applications, which provide cloud based services. The individual microservices are controlled by a management system. The microservices have interfaces that enable them to invoke one another to exchange data, e.g. by transmitting and receiving messages, and to perform their respective sets of functions in order to create an overall application.

Microservices can use message queue (MQ) systems for internal application communication. Instead of sending messages directly between individual microservices, each microservice communicates with the MQ. The MQ is responsible for routing, transport, load balancing, publish/subscribe, encryption, etc.

MQs often use a so called publish/subscribe messaging pattern. An MQ will have one or more "topics" to which applications can "subscribe". A sender "publishes" a message to a topic in the MQ, and all subscribers to that topic retrieve the message from the MQ.

A problem for the management system of a cloud application that wants to optimize its network- related functionality is that it does not have any information about the performance of the MQ system. To solve this problem, there are different existing MQ monitoring solutions that are designed specifically for different types of MQ systems: AMon for monitoring the overall health and performance of an ActiveMQ message broker; NATS provide a lightweight monitoring server for obtaining general statistics, info about routes, subscriptions, etc.; Dynatrace™ RabbitMQ monitoring for high-level overview of all RabbitMQ™ components within a cluster. US8907074 describes a solution for obtaining metrics such as queue lengths from the MQ, by so called self-selected message queue monitoring. Existing solutions, such as those described above, are mainly designed for monitoring a specific type of MQ system. They require updating or modifying the message system itself, e.g. by adding functionality to the MQ brokers. These solutions only provide metrics about the health of the MQ and high-level statistics about, for example, the number of producers, the number of consumers, the number and size of messages in the queue, routing information and queue sizes.

A management system of an application that wants to troubleshoot or monitor the performance between microservices over a MQ has no access to the MQ performance data. Metrics such as latency between given producers and consumers are not supported.

Summary

According to a first aspect of the present invention there is provided a processor implemented method for monitoring the performance of a message queue for communication between processes. The method comprises, by an initiating process, publishing a trigger message to a first topic in the message queue, wherein the trigger message identifies one or more performance metrics and at least two processes that communicate via the message queue. By one or more of said processes, retrieving the trigger message from the first topic in the message queue; performing a measurement on a message or messages exchanged between the processes over the message queue, wherein the measurement determines the one or more performance metrics; and publishing the one or more determined performance metrics to a second topic in the message queue. The method also comprises, at a receiving process, retrieving the published performance metrics from the second topic in the message queue.

It is an objective of the present invention to provide a generic method to monitor message queue systems, providing producer-to-consumer performance metrics to one or more receivers, such as management/orchestration systems, the message queue, the microservices, and cloud applications. The method is generic in the sense that it is not tailored to a specific message queue system, but may work with many different types of message queue systems.

Each process can be a microservice of an application with a microservice architecture, and the application can be a cloud application. The processes can be controlled by a management system and the initiating process and/or the receiving process may be the management system. The management system may be one of the at least two processes identified by the trigger message. The steps of retrieving the trigger message, performing a measurement, and publishing the one or more determined performance metrics, can be carried out by an intelligent socket agent of the or each process. The step of performing a measurement may include timestamping the message or messages exchanged between the processes. If at least two processes perform the measurement then each of said processes can publishes a timestamp to the second topic, and the receiving process can calculate the latency by taking the difference in time between the timestamps. Optionally, the trigger message specifies one of active monitoring and passive monitoring.

The one or more performance metrics may comprise at least one of latency, message throughput, and message drop rate. The method may comprise, at the receiving process, analysing the one or more determined performance metrics to produce aggregated results, and publishing the aggregated results to the second topic or a third topic in the message queue. The method may also comprise, by one or more processes and/or at the message queue and/or at one or more management systems, receiving the aggregated results from the message queue.

In certain embodiments of the invention the method comprises storing the determined performance metrics by the or each process that performed the measurement. The method of the first aspect of the invention, and wherein the processes are controlled by a management system, may comprise, at the management system, creating the first and second topics in the message queue.

According to a second aspect of the invention there is provided a server or a plurality of connected servers. The server(s) comprise one or more processors configured to perform the method of according to the first aspect of the invention. According to a third aspect of the invention there is provided a system for monitoring the performance of a message queue for communication between processes. The system comprises an initiating process configured to publish a trigger message to a first topic in the message queue. The trigger message identifies one or more performance metrics and at least a first process and a second process that communicate via the message queue. The system also comprises the first and second processes, of which at least one is configured to receive the trigger message from the first topic in the message queue and to perform a measurement on a message or messages exchanged between the first and second processes over the message queue. The measurement determines the one or more performance metrics. The at least one process is configured to publish the one or more determined performance metrics to the second topic in the message queue. The system also comprises a receiving process, which is configured to retrieve the published performance metrics from the second topic in the message queue.

Each process can be a microservice of an application with a microservice architecture, and the application can be a cloud application. The processes can be controlled by a management system and the initiating process and/or the receiving process may be the management system. The management system may be the first process or the second process.

At least one of the first and second processes may comprise an intelligent socket agent, which is configured to receive the trigger message, perform the measurement and publish the one or more determined performance metrics. The receiving process may be configured to analyse the one or more determined performance metrics received from the second topic in the message queue to produce aggregated results, and to publish the aggregated results to the second topic or a third topic in the message queue.

The first process and/or the second process can be configured to store the determined performance metrics.

The processes can be controlled by a management system and the management system may be configured to create the first and second topics in the message queue. According to another aspect of the invention there is provided a server or a plurality of connected servers, which comprise the system of the third aspect of the invention.

According to another aspect of the invention there is provided a computer program. The computer program comprises instructions which, when executed on at least one processor, cause the at least one processor to carry out the method according to the first aspect of the invention.

According to another aspect of the invention there is provided a carrier containing said computer program. The carrier is one of an electronic signal, an optical signal, a radio signal, or a computer readable storage medium.

Brief Description of Drawings Figure 1 shows a schematic diagram of a microservice architecture;

Figure 2 is a flow chart of an embodiment of the invention using passive monitoring; and

Figure 3 is a flow chart of an embodiment of the invention using active monitoring. Detailed Description

In order to provide producer-to-consumer performance monitoring of a message queue (MQ) system for communicating between processes (such as microservices) in an application or between applications, it is desirable to have a method that captures performance metrics at the processes. A process is an instance of a computer program that is being executed. A management system or another process requests the monitoring of certain performance metrics for communication between two or more processes over the MQ. The processes are provided with intelligent sockets (intsocs or intsoc agents) which perform measurements for messages exchanged between the processes, and then send the results to the management system. The management system analyses the results and may calculate aggregated results that can be shared with other network entities. The method may be applied to monitor any MQ system, without requiring any updates to the MQ system itself. The management system is itself a process and may comprise an intsoc agent, in order to perform measurements and publish results. Hence, the management system can be one of the processes identified in the trigger message for which monitoring is requested, In this way, monitoring of the control channel, i.e. monitoring of communication between the management system and other processes, is enabled. Figure 1 shows a microservice architecture 1 in accordance with an embodiment of the disclosure. The application includes a management system 2, a MQ system 3 with a MQ 4 and a MQ broker 5, two microservices 6, 7 with respective intelligent sockets 8, 9. The two microservices 6, 7 communicate with each other using the message queue system 3. Each microservice application 6, 7 uses an intelligent socket (intsoc) 8, 9 to connect to the MQ system 3. The intsocs 8, 9 receive monitoring triggers, perform measurements, and publish the results to the MQ system 4. The management system 2 is itself a client of the MQ system 3, which publishes measurement triggers, receives measurement results, and can also publish aggregated results to the MQ system 3. In an embodiment of the disclosure two microservices, A and B respectively, form a part of a cloud application. The application also comprises a management system and a message queue (MQ) with a MQ broker. Alternatively, the management system and MQ are services provided by a platform on which the application is run, and are not part of the application itself. The management system creates and publishes two topics to the MQ: 'triggers' and 'results'. The MQ broker routes messages in a specific topic to all subscribers of that topic. The management system subscribes to the 'results' topic, such that any messages published to this topic are sent to and received by the management system. The microservices of the application (including A and B) subscribe to the 'triggers' topic. The management system obtains information regarding all microservices in the application, including their identities and their subscriptions, so that it can request performance monitoring of the MQ for messages sent between specific microservices. The management system publishes a trigger message to the 'triggers' topic in the MQ. The message contains the identities A and B of two microservices, and the performance metric 'latency' to be captured. Since A and B subscribe to the 'triggers' topic they retrieve the trigger message from the MQ. Other microservices that have also subscribed to the 'results' topic, for example C and D, will also retrieve the trigger message, but will not take any action as they are not identified in the trigger message. A and B will, after parsing the trigger message, capture the performance metric specified in the trigger message. In this case the performance metric is 'latency'. The measurement process can include the following steps: A message sent from microservice A to microservice B is intercepted by the intsoc of A before being published to the MQ. The intsoc of A timestamps the message and sends it to the MQ. The MQ routes the message as normal and sends it towards B. The intelligent socket of B intercepts the message and timestamps it. The intelligent socket of B takes the difference in time between the two timestamps in the message, and publishes it in a new message to the 'results' topic in the MQ. Alternatively, both A and B publish their respective timestamps to the 'results' topic, which can then be used by the management system to calculate the latency.

The management system, which subscribes to the 'results' topic, retrieves the results message. A message sent from B towards A is similarly handled so that the latency of a message from B to A, as well as from A to B, is published to the 'results' topic and received by the management system. The management system may analyse and aggregate multiple results, and may share results with other network entities (e.g. microservices, the MQ system and other management systems). The management system can publish a message with aggregated results to the 'results' topic in the MQ, so that all subscribers of that topic receive them. The management system can also create another topic in the MQ, specifically for sharing the aggregated results with other network entities. Any other network entity may receive the aggregated results by subscribing to this 'aggregated results' topic. Aggregated results, in this sense, may be produced by analysing and processing a single results message, in order to put the results into a different form.

In an alternative embodiment, instead of intercepting and timestamping messages sent between the microservices as part of their normal operation within the application, i.e. passive monitoring, the trigger message published by the management system may specify 'active monitoring' of microservices A and B. After retrieving and parsing the trigger message, microservices A and B will create test messages to be sent between them in order to capture the performance metric specified in the trigger message. Microservice A creates a new test message to B, timestamps it, and publishes it to the MQ. The MQ routes the test message to B. B retrieves the test message, timestamps it, and publishes a new message with the captured performance metric to the 'results' topic in the MQ. Similarly B creates a test message to A, timestamps it, and publishes it to the MQ. The MQ routes the test message to A. A retrieves the test message, timestamps it, and publishes the captured performance metric to the 'results' topic in the MQ. The management system retrieves the two result messages from the MQ, and may analyse them and provide aggregated results to other network entities. As previously described, the timestamping and measuring steps are carried out by the respective intsocs of A and B.

Figure 2 illustrates a method of passive monitoring according to an embodiment of the invention. The management system connects to the messaging system S1. The management system creates the topics 'triggers' and 'results' S2, and then subscribes to the 'results' topic S3. The intsoc agents of the microservices subscribe to the 'triggers' topic S4. The management system obtains information about different topics and subscribers of topics from either the message queue brokers of the messaging system, the intsoc agents of the microservices or from itself, in order to identify microservices that communicate with each other S5. Then the management system publishes a message containing "passive monitoring between A and B microservices" to the 'triggers' topic S6. Intsoc agents corresponding to microservices A and B receive the message and intercept application messages, filter/sample and timestamp them, and create a new message S7. The intsoc agents publish a new message including timestamping information or other measurement results to the 'results' topic for further analysis by the management system S8. Optionally, the management system obtains the results, calculates aggregated results and publishes them to the 'results' topic S9.

Figure 3 illustrates a method of active monitoring according to an embodiment of the invention. The first five steps (S101 to S105) are the same as the first five steps in Figure 2, outlined above. After obtaining information about topics and subscribers of topics S105, the management system publishes a message containing "active monitoring between A and B microservices" to the 'triggers' topic S106. The intsoc agents of A and B receive the message and exchange active test messages to measure the requested monitoring metric S107. Each agent adds a timestamp for each incoming and outgoing test message S107. The intsoc agents publish the monitoring results to the 'results' topic which can be consumed by the management system, or the broker(s), or the cloud-native application by writing the results to a datastructure related to the intsoc S108. Optionally, the management system obtains the results, calculates aggregated results and publishes them to the 'results' topic The microservices can subscribe to the 'results' topic in the MQ S4, S104. For example, there may be individual microservices with functionality that can use the captured performance metrics, such as latency, to optimise network communication and application performance.

The disclosed method for performance monitoring of a MQ can be implemented by a system containing a management system 2 and at least two processes 6, 7 connected to each other by the MQ 4. The management system 2 is configured to request performance monitoring by publishing a trigger message to a 'triggers' topic in the MQ 4. Each process 6, 7 is configured to retrieve the trigger message from the 'triggers' topic in the MQ 4. The trigger message contains one or more performance metrics as well as the identities of the two connected processes 6, 7 which are to capture said performance metrics. The identified processes 6, 7 are configured to perform a measurement for a message or messages exchanged between them in order to capture the performance metrics. The processes 6, 7 are further configured to publish a message containing the results of the measurement to a 'results' topic in the message queue 4. The management system 2 is configured to retrieve the message with the results from the 'results' topic.

It will be appreciated by the person of skill in the art that various modifications may be made to the above described embodiments without departing from the scope of the invention. For example, only one of two processes specified in the trigger message may perform the measurement and publish the results to the MQ. Also, although in the above described embodiments only the management system requests performance monitoring, in other embodiments any process in the network may request performance monitoring by publishing a trigger message to the MQ.