ProDeveloperTutorial.com

Tutorials and Programming Solutions
Menu
  • Shell Scripting
  • System Design
  • Linux System Programming
  • 4g LTE
  • Coding questions
  • C
  • C++
  • DSA
  • GIT
  • 450 DSA Cracker
  • 5G NR
  • O-RAN

System Design Topic 1: Microservices Architecture

prodevelopertutorial February 15, 2019

In this topic we shall understand about what a micro architecture is and how it is useful in designing a highly scalable system.

So before learning about Micro Architecture, we shall first understand why Micro Architecture came into existence and how it is useful for the companies.

Before the introduction of Micro Architecture, there was a Monolithic Architecture.

A Monolithic Architecture is like a big box where all the software components are assembled in a tightly packed manner.

It means that all the components of a Monolithic Architecture are interconnected and inter dependent.

For example:

If you visit an online shopping website, they will be having:
1. Products service, where customers can look at the product.
2. Customer service, where customers can seek help to resolve any issues.
3. Cart service, where customers can buy the product.

So when you deploy the application, it will be deployed as a single instance that will be running all the time.

For scaling them, we shall run multiple instances of these application and keep them behind the load balancer.

The only advantage of these kind of application is the deployment will be easy and while scaling the application, you need to run multiple instances of the application which is easy.

But there are many disadvantages for this kind of architecture. Some of them are displayed below:

1. When you have a very large application, it will become difficult to modify and deploy the application without knowing all the dependencies.

2. The development and maintenance of the application will be difficult. As the application size is large, a simple bug fix will require complete analysis of the application.

3. The application memory consumption will be unfair. For example, a chat application will require less amount of CPU usage, but a payment checkout will require quick and immediate CPU resource. But in these kind of application, we cannot divide the CPU resources.

4. Single point of failure. Because all of the application are tightly dependent, if one of the application goes down, entire application will be effected. Hence it will make the application highly unstable.

5. Since all the modules are interdependent, adding new module or adding a new feature for existing module will become difficult.

Hence we shifted towards Microservices Architecture.

What is a Microservices Architecture?

This architecture is a collection of small autonomous services that together form a complete application.

Here all applications are independent of each other. They communicate through API provided by the applications.

Below are some of the advantages of using Microservices Architecture:

1. Each Microservices can focus on one business logic
2. If any one of the service is down, it will not affect other services, as they are independent of each other.
3. Development and bug fixing is easy, because the developer will focus on only one module.
4. Instead of having a single database, each Microservices will be having its own database, avoiding single point of failure.

Below are some of the features of Microservices:

1. Decoupling: The modules can be easily build, scaled and deployed.
2. Autonomy: Teams can work independently
3. Continuous Delivery

If we take the same example of online shopping application, we have

1. Products Microservice.
2. Customer Microservice.
3. Cart Microservice.

As we have made all the modules as Microservices, each module will communicate with the API provided by other application.

Components involved in Microservice Architecture:

1. API gateway
2. Load Balancer
3. Database
4. Service discovery

Open-source tools for developing Microservices:

Operating System: CentOS
Container: Docker
Scheduler: Kubernates
Monitoring: Prometheus
Messaging: rabbitMQ
API: POSTMAN
Programming Language: Elixir

Below are some of the companies using Microservices:

Twitter
Netflix
Amazon
Paypal

 

List Of Tutorials available in this website:

C Programming 20+ ChaptersC++ Programming 80+ Chapters
100+ Solved Coding QuestionsData Structures and Algorithms 85+ Chapters
System design 20+ ChaptersShell Scripting 12 Chapters
4g LTE 60+ ChaptersMost Frequently asked Coding questions
5G NR 50+ ChaptersLinux System Programming 20+ chapters
Share
Email
Tweet
Linkedin
Reddit
Stumble
Pinterest
Next Article

About The Author

prodevelopertutorial

Follow this blog to learn more about C, C++, Linux, Competitive Programming concepts, Data Structures.

Leave a Reply Cancel Reply

You must be logged in to post a comment.

ProDeveloperTutorial.com

Tutorials and Programming Solutions
Copyright © 2023 ProDeveloperTutorial.com
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT