Today applications are often designed with a modular approach, dividing functionality into micro services rather than relying on a monolithic structure. This requires solutions for decoupled message exchange throughout the distributed system and can be achieved by implementing a message broker. In some cases, it is interesting to make the message broker itself a distributed system, which has been a development path for systems such as RabbitMQ, Apache Kafka, and others. This thesis seeks to understand the alternative approaches to implementing a distributed solution for the message broker LavinMQ. To find out which algorithm would be the most suitable for this purpose, a comparative analysis of the most common alternatives was performed based on LavinMQ's requirements and a literature review of related comparisons. The results showed that Raft would be the best choice due to its simple but effective nature. To further investigate the consensus approach in LavinMQ, a Raft prototype was developed in the programming language Crystal. The prototype was then evaluated based on correctness and performance in terms of mean replication time and mean election time. The prototype successfully passed the correctness tests, showing that the prototype successfully achieves correctness according to LavinMQ standard. The mean election time results show that the prototype recovers from a leader failure in 216 ms and that the most effective range for the heartbeat timeout is 150 to 300 ms. The replication time test results show that the mean replication time is 84.45 ms and the most efficient interval for message replication is 0.13 ms. The performance results are consistent with the results of related work, however result in overall slower performance and indicate that some additional features and optimizations need to be implemented in order to consider the prototype for practical use.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-186877 |
Date | January 2022 |
Creators | Christina, Dahlén, Erica, Weistrand |
Publisher | Linköpings universitet, Institutionen för datavetenskap |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0019 seconds