Author: Zhang, Xinyan
Title: Optimizing load balance in microservice architecture
Advisors: Shao, Zili (COMP)
Degree: M.Sc.
Year: 2018
Subject: Hong Kong Polytechnic University -- Dissertations
Hashing (Computer science)
Software architecture
Computer network architectures
Video games industry -- Management
Department: Department of Computing
Pages: viii, 47 pages : color illustrations
Language: English
Abstract: Since Martin Fowler put forword the concept of microservices in 2014, microservices have been widely used in various fields. Big companies in internet industry, such as Google, Netflix and Amazon have gradually changed their projects into the architecture of microservices. However, in the game industry, few companies actually use the architecture of microservices. In this thesis,we propose a framework of online game with the architecture of microservices. First, we focus on sharding method in hashing to improve the performance of consistent hashing. There are many services in our framework of microservices and it is important to balance the loads between these services. Consistent hashing is better than the normal hashing. We only need to remap K/n keys, K is the number of keys and n is the number of slots, when we resize the hash table. While we have to remap almost all keys in the traditional hashing. But consistent hashing also has some disadvantages. If we have not enough nodes for hashing,the result is unsatisfactory. So we add a layer of virtual nodes to solve this problem. We also propose a weighted method which considers the online time and number of operations of the user. Then we propose a method transferring loads between services, which is based on this weighted method. Second, we introduce the framework of online game. We can benefit a lot from the architecture of microservices, such as flexibility, scaling and ease of deployment. We propose three methods to enhance the architecture of microservices. The auto-starting method enables a duplication of service to be started automatically when the existing services are full loaded. The auto-detecting method enables the crashed service to be restarted. The auto-defending method can find out the bots endangering the game system and block them. Third, we propose a method to use swarm to manage the microservices running on different Docker hosts. Then we use the features of Kafka to send messages among microservices. The experimental results of the sharding method and the weighted method are given in this report and the results are encouraging.
Rights: All rights reserved
Access: restricted access

Files in This Item:
File Description SizeFormat 
991022109836403411.pdfFor All Users (off-campus access for PolyU Staff & Students only)532.88 kBAdobe PDFView/Open


Copyright Undertaking

As a bona fide Library user, I declare that:

  1. I will abide by the rules and legal ordinances governing copyright regarding the use of the Database.
  2. I will use the Database for the purpose of my research or private study only and not for circulation or further reproduction or any other purpose.
  3. I agree to indemnify and hold the University harmless from and against any loss, damage, cost, liability or expenses arising from copyright infringement or unauthorized usage.

By downloading any item(s) listed above, you acknowledge that you have read and understood the copyright undertaking as stated above, and agree to be bound by all of its terms.

Show full item record

Please use this identifier to cite or link to this item: https://theses.lib.polyu.edu.hk/handle/200/9407