帳號:guest(3.16.50.252)          離開系統
字體大小: 字級放大   字級縮小   預設字形  

詳目顯示

以作者查詢圖書館館藏以作者查詢臺灣博碩士論文系統以作者查詢全國書目
作者(中文):亞尼爾
作者(外文):Tellez Sazo, Abner Isaac
論文名稱(中文):微服務架構模式的性能分析
論文名稱(外文):Performance Analysis for Microservices Architecture Patterns
指導教授(中文):孫宏民
指導教授(外文):Sun, Hung-Min
口試委員(中文):許富皓
黃世昆
口試委員(外文):Hsu, Fu-Hau
Huang, Shih-Kun
學位類別:碩士
校院名稱:國立清華大學
系所名稱:資訊系統與應用研究所
學號:106065434
出版年(民國):108
畢業學年度:107
語文別:英文
論文頁數:61
中文關鍵詞:面向服務的體系結構微服務事件驅動的通信擴展環境
外文關鍵詞:Service-oriented architectureMicroservicesAPIEvent-driven communicationScaling environments
相關次數:
  • 推薦推薦:0
  • 點閱點閱:356
  • 評分評分:*****
  • 下載下載:10
  • 收藏收藏:0
微服務模式是許多公司用於構建和部署應用程序編程接口(API)的最具體系結構的通用設計之一,考慮到它們可以提供的所有優勢,高可伸縮性,靈活性,易於部署和管理。 這種模式自然地在粒度環境中作為分佈式系統工作,因此實際上,當涉及工作流中的許多服務時,它具有需要解決的挑戰,如何控制響應延遲以及相互通信中的性能問題。

在本研究中,提出了使用不同方法構建微服務的性能分析研究,並對可能影響響應時間的架構考慮進行了全面審查。 分析顯示了在不同策略中使用CPU,RAM,網絡流量和延遲的性能詳細信息。

該實驗考慮了編碼體系結構模式,可伸縮性工具以及用於服務相互通信的同步和異步消息傳遞,以獲得有關使用微服務構建應用程序所需的所有挑戰的大廳信息。 旨在提供實施此體系結構模式的主要組件的指南。
Microservices pattern is one of the most architectural common designs used for many companies to build and deploy Application Programming Interfaces (APIs), considering all the advantages that they can provide, how high scalability, flexibility, easy to deployment and management. This pattern naturally works in a granulated environment as distributed systems, so indeed, it has challenges that need to be addressed, how controlling responses delay, and performance issues in inter-communication when involving many services in the workflow.

In this research, is presented a study of performance analysis using different approaches to build microservices, with a complete review of architectural consideration that could affect the response time. The analysis shows the performance details about the use of CPU, RAM, Networking Traffic, and latency in the different strategies.

The experimentation considerate coding architectural patterns, scalability tools and synchronous and asynchronous messaging for services intercommunication, to have an over hall information about all the challenges to entails to built an application using microservices. Aiming to provide a guideline with the principal components in the implementation of this architectural pattern.
Table of Contents i
List of Figures iv
List of Tables vi
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Background 4
2.1 Monolithic Architectures . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Microservices Architecture . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.1 Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1.1 Autonomous . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1.2 Scalable . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1.3 Composable . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2 Inter-Communication . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.2.1 Single Receiver . . . . . . . . . . . . . . . . . . . . . 11
2.2.2.2 Multiple Receivers . . . . . . . . . . . . . . . . . . . 11
2.2.2.3 Synchronous Communication . . . . . . . . . . . . . 11
2.2.2.4 Asynchronous Communication . . . . . . . . . . . . 12
2.2.3 Orchestration vs Choreography . . . . . . . . . . . . . . . . . 13
2.2.3.1 Observer Pattern . . . . . . . . . . . . . . . . . . . . 15
2.2.3.2 Publisher-subscriber Pattern . . . . . . . . . . . . . 15

3 Technical Aspects 17
3.1 Web API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.1 API Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1.1.1 REST Protocol . . . . . . . . . . . . . . . . . . . . . 18
3.1.1.2 HTTP Protocol . . . . . . . . . . . . . . . . . . . . 19
3.1.2 Data Serialisation . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.2.1 JSON . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.2.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Related works 22

5 Proposed Method 24
5.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

6 Implementation 26
6.1 Designing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.2 Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2.1 Architectural Pattern . . . . . . . . . . . . . . . . . . . . . . 30
6.2.2 Programming Language . . . . . . . . . . . . . . . . . . . . . 32
6.2.2.1 Node JS and Express JS . . . . . . . . . . . . . . . 33
6.2.3 Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2.4 Event Driven Communication for Asynchronous Messaging . . 34
6.3 Deploying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3.1 Container Pattern . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3.1.1 Docker . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3.1.2 Clustering using Docker Swarm . . . . . . . . . . . . 37

7 Experimentation and Results 39
7.1 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.1.1 JMeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.1.2 DataDog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.2 Test 1: Monolithic Pattern . . . . . . . . . . . . . . . . . . . . . . . . 41
7.2.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.2.1.1 Latency . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2.1.2 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.2.1.3 Memory . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.2.1.4 IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.3 Test 2: Microservice Architecture Pattern . . . . . . . . . . . . . . . 44
7.3.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3.1.1 Latency . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3.1.2 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3.1.3 Memory . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3.1.4 IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.4 Test 3: Scaling Strategies . . . . . . . . . . . . . . . . . . . . . . . . 47
7.4.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.4.1.1 Latency . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.4.1.2 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.4.1.3 Memory . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.4.1.4 IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.5 Test 4: Asynchronous Communication using Event-Driven Pattern . . 50
7.5.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.5.1.1 Latency . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.5.1.2 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.5.1.3 Memory . . . . . . . . . . . . . . . . . . . . . . . . . 52
7.5.1.4 IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8 Conclusion 54
8.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Bibliography 57
[1] Api design. https://docs.microsoft.com/en-us/azure/architecture/
best-practices/api-design.
[2] Communication in a microservice architecture.
https://docs.microsoft.com/en-us/dotnet/standard/microservices-a
rchitecture/architect-microservice-container-applications/commun
ication-in-microservice-architecture.
[3] Express js. https://expressjs.com/.
[4] Microservices vs monolithic architecture. https:
//www.mulesoft.com/resources/api/microservices-vs-monolithic.
[5] Model-view-controller. https://docs.microsoft.com/en-us/previous-ve
rsions/msp-n-p/ff649643(v=pandp.10).
[6] Node js. https://nodejs.org/en/about/.
[7] Raml. https://raml.org/.
[8] Rest resource naming guide. https://restfulapi.net/resource-naming/.
[9] What is rest. https://restfulapi.net/.
[10] Wikipedia: Divide-and-conquer algorithm.
https://en.wikipedia.org/wiki/Divide-and-conquer_algorithm.
[11] Xml tutorial. https://www.w3schools.com/xml/.
[12] Robert C. Martin (Uncle Bob). The single responsibility principle.
https://blog.cleancoder.com/uncle-bob/2014/05/08/SingleReponsibil
ityPrinciple.html.
[13] BoldRadius. Domain driven design through onion architecture.
https://www.youtube.com/watch?v=pL9XeNjy_z4.
[14] Tony Bradley. The challenges of scaling microservices. https://techbeacon
.com/app-dev-testing/challenges-scaling-microservices.
[15] Robert Ramač Vladimir Mandić Branislav Mišić, Milana Novković. Do the
microservices improve the agility of software development teams? University
of Novi Sad, Faculty of Technical Sciences„ University of Novi Sad, Faculty of
Technical Sciences„ 2017.
[16] Chris Brook. What is a data repository?
https://digitalguardian.com/blog/what-data-repository.
[17] Mario Bunge. A general black box theory. Philosophy of Science, 30(4):
346–358, 1963.
[18] Nimesh Chhetri. A comparative analysis of node.js (server-side javascript).
Master’s thesis, St. Cloud State University, USA, 2 2016.
[19] Floyd Smith Chris Richardson. Microservices, From Design to Deployment.
Ngnix, 2016.
[20] Douglas Crockford. Introducing json. https://www.json.org/.
[21] DataDog™. Datadog. https://www.datadoghq.com.
[22] Richard Hill Dharmendra Shadija, Mo Rezai. Microservices: Granularity vs.
performance. Sheffield Hallam University„ Sheffield Hallam University„ 2017.
[23] Eric Evans. Domain-Driven Design. Addision Wesley, 2004.
[24] Docker Inc. Swarms. https://docs.docker.com/get-started/part4/.
[25] Docker Inc. What is a container?
https://www.docker.com/resources/what-container.
[26] Joseph Ingeno. Software Architect’s Handbook. Packt Publishing, 2015.
[27] Joab Jackson. How synchronous rest turns microservices back into monoliths.
https://thenewstack.io/synchronous-rest-turns-microservices-back
-monoliths/.
[28] Martin Fowler James Lewis. Microservices.
https://martinfowler.com/articles/microservices.html.
[29] Martin Fowler James Lewis. Microservices.
https://martinfowler.com/articles/microservices.html.
[30] Apache JMeter™. Jmeter. https://jmeter.apache.org/.
[31] Petter Johansson. Efficient communication with microservices. Master’s
thesis, UMEA University, Sweden, 6 2017.
[32] A. M. Joy. Performance comparison between linux containers and virtual
machines. In 2015 International Conference on Advances in Computer
Engineering and Applications, pages 342–346, March 2015.
[33] Adalberto R. Sampaio Jr. Improving microservice-based applications with
runtime placement adaptation. Journal of Internet Services and Applications,
2019.
[34] C. G. Kominos, N. Seyvet, and K. Vandikas. Bare-metal, virtual machines
and containers in openstack. In 2017 20th Conference on Innovations in
Clouds, Internet and Networks (ICIN), pages 36–43, March 2017.
[35] Colin Lu. Event-driven orchestration: Effective microservices integration
using bpmn and amqp. https://dzone.com/articles/event-driven-orch
estration-an-effective-microservi, 2018.
[36] Lori MacVittie. The art of scale: Microservices, the scale cube and load
balancing. https://devcentral.f5.com/s/articles/the-art-of-scalemicroservices-
the-scale-cube-and-load-balancing.
[37] Michael T. Fisher Martin L. Abbott. The art of Scalability. Pearson
Education, 2015.
[38] camille347 fscholz obiora22 gavdaddy27 mike-lang teoli mdnwebdocs bot,
aichbauer. Basics of http.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods.
[39] funghorn BunnyWong chrisdavidmills cissoid-teoli fscholz mdnwebdocs bot,
ExE-Boss. Basics of http.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTT.
[40] MuleSoft. What is an api?
https://www.mulesoft.com/resources/api/what-is-an-api.
[41] Sam Newman. Building Microservices. O’Reilly Media, 2015.
[42] Martin Storø Nyfløtt. Optimizing inter-service communication between
microservices. Master’s thesis, Norwegian University of Science and
Technology, Norwegian, 12 2017.
[43] Felipe Osses, Gastón Márquez, and Hernán Astudillo. An exploratory study
of academic architectural tactics and patterns in microservices: A systematic
literature review. 02 2019.
[44] Ritesh Patel. Microservices: Five architectural constraints.
https://www.nirmata.com/2015/02/02/microservices-five-architect
ural-constraints/.
[45] Srinivas Thonse Renuka Sindhgatta. Functional and non-functional
requirements specification for enterprise applications. 2005.
[46] Bob Reselman. The impact of microservice architecture on load testing.
https://www.neotys.com/blog/impact-microservice-architecture/.
[47] Mark Richards. Software architecture patterns.
https://www.oreilly.com/library/view/software-architecture-patte
rns/9781491971437/ch02.html.
[48] Amazon Web Services. Amazon sqs. https://aws.amazon.com/sqs/.
[49] Jonathan Natanael Siahaan. Difference between pub-sub pattern and
observable pattern. https://medium.com/easyread/difference-between
-pub-sub-pattern-and-observable-pattern-d5ae3d81e6ce.
[50] Smart Bear Software. Why you can’t talk about microservices without
mentioning netflix. https://smartbear.com/blog/develop/why-you-can
t-talk-about-microservices-without-ment/.
[51] J. Thönes. Microservices. IEEE Software, 32(1):116–116, Jan 2015.
[52] Stephen Watts. Microservices vs soa: What’s the difference?
https://www.bmc.com/blogs/microservices-vs-soa-whats-difference/.
 
 
 
 
第一頁 上一頁 下一頁 最後一頁 top
* *