Lädt...


🔧 Microservices vs Monolithic Architecture: A Practical Approach


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

📍 Monolithic and Its issues

🙂 When we start learning backend development and implementation, many of us implement all our functionalities in one codebase. Forex. If we want to build the backend of an e-commerce store then we can go with the project with a single index.js file including the functionality of:-

  • Shopping Orders
  • Items or Products
  • Payment
  • Store
  • Wallet
  • Cart

🙋 But is it right to do so? We do have the advantages of the monolithic architecture like easy testing, and easily deployable. But we do have some issues like scalability, load balancing, and error handling.

Microservices meme

🎯 With Microservices we can address these issues and we also can use some of the advanced technologies like Docker, Kubernetes effectively.

📍 Microservices

Microservices example

🎯 Microservices architecture includes working of separate services that are loosely coupled and work on different ports and with their own database generally.

😌 Let's take an example of an eCommerce app with payment, product, and shipping service. It may look like this:-

Example:-

Product
--> Used:- JAVA, MYSQL
--> Working on:- PORT 3001
Payment
--> Used:- NODE, MongoDB
--> Working on:- PORT 4000
Shipping
--> Used:- Python, SQLite
--> Working on:- PORT 3002

🙂 Now these services can communicate with each other using APIs and all. We have the advantages of load balancing, error handling (If payment service fails it will not affect the product service), and modular code with this architecture (Microservices).

📍 Microservices Patterns

🔥 While we implement microservices, there are some patterns like using BFF (Backend for frontend), Service Discovery

BFF (Backend for frontend)

API Gateway

👉 Here, we have API Gateway that handles all the stuff like Authentication, load balancing ,etc and act as a reverse proxy to accept the incoming requests and gives the appropriate results.

Service Discovery Registry

Load balancing in Microservices

👉 It is used when we have multiple instances of a service and we get the address of the particular instance from the service discovery.

🙂 Note:- We will see the implementation too, Don't get panic if you are not able to understand fully.

Inter-Microservice Communication

Inter Microservices communication

👉 This is one of the method where we can make calls between the services. You can make Sync calls or Async calls depending on the functionality. Here, we have used the Queue where the messages will be passed from service 1.

Circuit Breaking

Circuit breaking pattern

👉 This situation arises when one or more calls fails in between and other keeps waiting. forex. Service2-->Service3 call fails and Service 1 will keep waiting. In that case, we can do following:-

  • Use the last recent call stored inside the cache from service 2 and 3 and give the response
  • Fallback call:- It is the case when Service 3 calls another third party API and waiting for a long time. Then Service 2 can directly call to that 3rd party API

Log Aggregation Pattern

Log storing

👉 It is the Pattern where we store all the logs of our active microservices so that we can track and monitor them

Serverless

Serverless

👉 It is a cloud computing application where we can use Functions that triggers while we call. These functions do have a cold start time though but might be very effective in most of the applications.

🔥 Follow for more. We will see the implementation in our next Blog. Share this series and drop your views

...

🔧 Microservices vs Monolithic Architecture: A Practical Approach


📈 65.67 Punkte
🔧 Programmierung

🔧 What is difference between monolithic architecture and microservices architecture


📈 53.86 Punkte
🔧 Programmierung

🔧 Monolithic vs Microservices Architecture: Choosing the Right Approach for Your Application


📈 53.75 Punkte
🔧 Programmierung

🔧 Microservices vs. Monolithic Architecture


📈 43.66 Punkte
🔧 Programmierung

🔧 # Day 3: Monolithic vs. Microservices Architecture: A Detailed Comparison


📈 43.66 Punkte
🔧 Programmierung

🔧 Monolithic vs Microservices Architecture: Key Differences


📈 43.66 Punkte
🔧 Programmierung

🔧 Why Microservices Are Important Compared to Monolithic Architecture


📈 43.66 Punkte
🔧 Programmierung

🔧 Microservices vs. Monolithic Architecture


📈 43.66 Punkte
🔧 Programmierung

🔧 Transitioning from Monolithic to Microservices Architecture


📈 43.66 Punkte
🔧 Programmierung

🔧 Choosing the Right Software Architecture: Monolithic vs. Microservices


📈 43.66 Punkte
🔧 Programmierung

🔧 Monolithic, Microservices and Mono Repo Architecture


📈 43.66 Punkte
🔧 Programmierung

📰 Monolithic vs microservices architecture: Which is better for security?


📈 43.66 Punkte
📰 IT Security Nachrichten

🔧 Monolithic vs. Microservices Architecture


📈 43.66 Punkte
🔧 Programmierung

🔧 Monolithic vs Microservices Architecture: Which Option is Right for Your Enterprise?


📈 43.66 Punkte
🔧 Programmierung

🔧 Monolithic vs Microservices Architecture: A Comprehensive Guide


📈 43.66 Punkte
🔧 Programmierung

🔧 Microservices vs. Monolithic Architecture in .NET Applications


📈 43.66 Punkte
🔧 Programmierung

🔧 Microservices Logging | A Practical Guide to Logging in Microservices


📈 37.28 Punkte
🔧 Programmierung

🔧 Microservices Architecture: Benefits and Challenges of Microservices


📈 35.56 Punkte
🔧 Programmierung

🔧 Top Microservices Design Patterns for Microservices Architecture


📈 35.56 Punkte
🔧 Programmierung

🔧 Microservices Interview Questions and Answers | Microservices Architecture Training


📈 35.56 Punkte
🔧 Programmierung

🔧 From Monolithic to Microservices: A Comprehensive Guide


📈 33.46 Punkte
🔧 Programmierung

🔧 The Rise of Microservices: Why Monolithic Architectures Are Becoming Obsolete


📈 33.46 Punkte
🔧 Programmierung

🔧 Difference between Microservices vs Monolithic Applications for System Design Interview


📈 33.46 Punkte
🔧 Programmierung

📰 Microservices vs. Monolithic Approaches in Data


📈 33.46 Punkte
🔧 AI Nachrichten

🔧 Monolithic or Microservices?


📈 33.46 Punkte
🔧 Programmierung

🔧 Software Architecture Patterns: Microservices Architecture


📈 33.08 Punkte
🔧 Programmierung

🔧 How do you approach testing and debugging in a microservices architecture during software development?


📈 32.97 Punkte
🔧 Programmierung

🔧 Choosing the Right Architecture for Your Web Application: A Practical Approach for Startups


📈 32.21 Punkte
🔧 Programmierung

🔧 The Difference Between Monolithic and Microservice Architecture


📈 30.98 Punkte
🔧 Programmierung

🔧 Monolithic vs Microservice Architecture: A Beginner's Guide


📈 30.98 Punkte
🔧 Programmierung

🔧 Understanding the differences between micro-service and monolithic architecture.


📈 30.98 Punkte
🔧 Programmierung

🔧 Monolithic Architecture in Programming: An In-Depth Exploration


📈 30.98 Punkte
🔧 Programmierung

🔧 5 Open-Source Repositories for Faster Development in Monolithic Architecture


📈 30.98 Punkte
🔧 Programmierung

matomo