100% found this document useful (1 vote)
583 views

Microservices

Uploaded by

suraj pahari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
583 views

Microservices

Uploaded by

suraj pahari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Microservices

Rupesh Gaudel Regmi


Contents

● What is Microservice
● Why should we use Microservice
● When should we use Microservice
● How to use Microservice
● Discussion
● Code Example
What is Microservice

Microservice architecture split Business Logic and Data Access Layer into several small part called Microservices.
Real business logic and Data access are implemented by invoking multiple different microservices distributed on different nodes.
Why should we use Microservice

Scalability —— Distribution

You don’t need to have one very powerful server to run your application. Instead you could use several relatively weaker servers and run different microservices on
each of them. The system will have better IO performance since the tasks are distributed and can be done simultaneously.
By combining microservice with edge computing, you can take advantage of IOT devices like raspberry pi or arduino to provide service locally for users.
Why should we use Microservice

Non-uniform Scaling

Monolithic Architecture Microservice Architecture


The bottleneck may only exist in some part of the application like request handling. It makes no sense to replicate the whole application for just improving request handling
performance.
In Microservice architecture, we can do non-uniform scaling by deploying multiple instance of particular service so we can get higher utilization with less server resource.
Why should we use Microservice

Portability

Microservice architecture has very good portability by using container technology like Docker
Why should we use Microservice

Elasticity

When there are not so many requests, the server load is low, and it can stop those unnecessary replicas of services and shutting down some servers to save power and reduce
the stress of cooling system. When the request increase, the server could automatically deploy new containers to provide service according to the metrics like response time.
When the request number increasing speed hit some threshold or if our machine learning model predicted that there will be a heavy load, the system could boot some servers
for more resource to deploy microservice. vice versa
Why should we use Microservice

Availability

When updating the application, we don’t have to shutdown the whole application and then deploy the new one.
by using microservice architecture, we just need a little bit of extra resource for the service we are going to update.
Why should we use Microservice

Robustness

If one server has hardware failure like hardware broken or power cut. other servers could still provide all the services.
When should we use Microservice
How to use Microservice
Programming language doesn’t matter

You can use any programming language you want as long as you can provide solid API documentation so other services can communicate with it and invoke
the service properly.
How to use Microservice

In this architecture, Microsoft uses rabbitMQ and AzureService Bus as the eventbus middleware for data/message sharing between all the microservices.
Using message queue can change the business logic from synchronized logic to asynchronized logic and result in a better io performance.
Discussion
Positive

● Very strong scalability


○ Distribution
○ Non-uniform Scaling
○ Portability
○ Elasticity
○ Availability
○ Robustness
● Programming language doesn’t matter, easy to find a developer to build microservices
● For a complex system, microservice architecture has higher productivity
● Easy to learn
● Agile friendly
Discussion
Negative

● Microservice need more precise documentation


● Microservice need more experienced System Operator
● Microservice should be integrated with Continuous Integration (CI) and Continuous
Delivery (CD) otherwise it will cost too much human resource in maintenance
Code Example
Reference

● Anderson, C. (2015). Docker [software engineering]. IEEE Software, 32(3), 102-c3.


● Dragoni, N., Giallorenzo, S., Lafuente, A. L., Mazzara, M., Montesi, F., Mustafin, R., &
Safina, L. (2017). Microservices: yesterday, today, and tomorrow. In Present and ulterior
software engineering (pp. 195-216). Springer, Cham.
Thank you!

You might also like