Sunil Kumar Profile picture
30 Oct, 16 tweets, 3 min read
Micro Services Architecture Vs Monolith Architecture:

You might have heard about these terms again and again. But what are they, their advantages and disadvantages?

Let's discuss it in this thread: 🧵👇🏻
Micro Services Architecture:

Micro Services is an architectural style where a single application is built as a suite of multiple smaller services which are loosely coupled, maintainable and scalable separately.

Let's discuss what that means.

👇🏻
Let's take the below example:

As you can see, our example application takes care of user accounts, reading and updating inventory and shipping the products to end users.

👇🏻
Now in the micro services architecture each of these functionalities are implemented using different services and they have their own database to keep the related data.

Services talk to each other through HTTP calls.

👇🏻
Each service will have their own codebase (Ex: separate Github repositories for each service), deployment pipeline, host URL and other dependent resources.

👇🏻
Monolith Architecture:

(Monolithic architecture is something that build from single piece of material, historically from rock. Monolith term is normally used for an object made from single large piece of material)

👇🏻
In Monolith architectural style the whole application is built as a single service with a single codebase which includes different components of the application.

👇🏻
In the below example all the three Catalog Service, Order Service & Payment Service are present in a single service including end user applications like website, mobile app etc.

All the data is kept in a single database as well.

👇🏻
Although micro services architecture is proving to be more popular these days, this is not a silver bullet architecture that everyone should follow.

Each of these architectures have their advantages and disadvantages. Let's discuss about them next:

👇🏻
Advantages of Micro Services Architecture:

1⃣ Fault Isolation: Even if there's an issue in a single service all the other services will remain unaffected and continue to work normal. Whereas in a monolith the whole application will be affected.

👇🏻
2⃣ Development Flexibility: Individual Services can be developed using different languages. One service can be developed in GoLang, another is Python/Django etc. But in case of Monolith the whole application should use a single Language / Framework.

👇🏻
3⃣ Faster Deployments: Smaller codebase will result in faster deployments & easy to maintain.

4⃣ Scalability: Individual services can be scaled separately based on the demand. In our example Inventory Service can have more number of tasks running than other services.

👇🏻
Disadvantages of MicroServices Architecture:

1⃣ Communication: Having too many micro services can make communication between them complex and also it adds to the overall latency since communication between different services is a HTTP call.

👇🏻
2⃣ Resources: More services means more resources.

3⃣ Testing & Debugging: Since there are many components involved, testing and debugging can become difficult.

👇🏻
4⃣ Deployment: On the one hand micro services architecture simplifies the deployment of individual services. On the other hand any end to end feature needs deployment of all the services and it can add complexity to the process.

👇🏻
I hope the Micro Services Vs Monolith Architecture is clearer to you now. Feel free to add any more information I may have missed.

Consider subscribing to my blog if you like this thread:

sunilkumarc.in

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sunil Kumar

Sunil Kumar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sunilc_

31 Oct
Are you a JavaScript developer and Game Development enthusiast?

Here's a list of JavaScript game engines you should check out:

🧵👇🏻
1. three.js

JavaScript 3D library.

github.com/mrdoob/three.js
2. pixi.js

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.

github.com/pixijs/pixi.js
Read 11 tweets
29 Oct
DATABASE CONNECTION POOLING is one of the import concepts to know for every Software Developer (both front-end and back-end).

You should know how REST services are optimised using database connection pooling.

Let's discuss it in this thread 🧵👇🏻
Let's say you have a backend service which has an API endpoint to read data from a database table.

This is how a naive developer would implement such an endpoint:

- open db connection
- read the data from database
- close db the connection
- return the response

👇🏻
Now there's nothing wrong with implementing it this way. The end point works perfectly fine and it returns the desired results.

The problem is when you get so many concurrent requests.

Every API call is going to open a database connection and that's not good because...

👇🏻
Read 10 tweets
27 Oct
Are you a freelancer and struggling to manage your time between different projects & clients?

Here's a list of tools and resources to help you organise your work:

🧵👇🏻
1. Beagle: A tool for creating better contract proposals

producthunt.com/posts/beagle
2. Funnel: A CRM for small businesses and freelancers

producthunt.com/posts/funnel-2
Read 6 tweets
26 Oct
Are you a front-end developer?

These design libraries will help you create stunning products on the web:

🧵👇🏻
1. Bootstrap: The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

github.com/twbs/bootstrap

👇🏻
2. Animate.css: 🍿 A cross-browser library of CSS animations. As easy to use as an easy thing.

github.com/animate-css/an…
Read 14 tweets
24 Oct
Do you want to start making money through Freelancing but struggling to get started?

Here are some tips for you to get started and grow from there:

🧵👇🏻
Most people struggle to get their first freelancing task. I used to think I may never be able to earn any money through freelancing with my skills (until last year).

But freelancing is not difficult at all!

You just have to go through the barrier of getting that first task.

👇🏻
Once you complete your first task, there's no stopping you.

Know that even 👉🏻 YOU can make a lot of money through freelancing!

Here are some tips to land your first task and how to grow from there:

👇🏻
Read 15 tweets
23 Oct
Are you a Python Developer & an Open Source enthusiast? 🐍

Here's a list of Python open source projects you can contribute to:

🧵👇🏻
1. Tensorflow ( ⭐️ 149k )

github.com/tensorflow/ten…
2. Youtube dl ( ⭐️ 72.2k )

github.com/ytdl-org/youtu…
Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!