Chaos Engineering Make Disciplined Microservices

Chaos Engineering Make Disciplined Microservices

Chaos and discipline, These two words are an oxymoron, you might be thinking, how can chaos make disciplined microservices? Chaos Engineering Make Disciplined Microservices. Chaos Engineering is a technique by which you can measure the resilience of your architecture.

Chaos Engineering is a technique by which you can measure the resilience of your architecture. We will inject Fault and then we will check how the services react.

Chaos and discipline, These two words are an oxymoron, you might be thinking, how can chaos make disciplined microservices?

But the universal truth is discipline means the absence of chaos, so until you have not experienced chaos you can not be disciplined.

If we think about the Law of Entropy, then chaos is the high entropy state, and discipline is the low entropy state. Always disciplined services degrade to chaotic ones to make the system in equilibrium, as the flow of the direction is from high (chaos) to low entropy (discipline) state. So chaos is inevitable.

Now, If we want to make sure our services remain in a low entropy state (discipline) throughout, we need to adopt a few special techniques. As per the laws of physics, this is an irreversible process (flow from low to high entropy state), it is going against entropy we called it reverse entropy (watch Christopher Nolan Masterpiece TNET!!!)

A refrigerator is a reverse entropy object (doing cooling), the crux is to maintain discipline in your services we need to adopt a Resilience strategy but the question is how to determine what resilience strategy needs to be adopted? For that, we have to experience chaos in production and act accordingly.

This is the essence of chaos engineering, by injecting mild fault into the system to experience the chaos and take preventive measures and self-healing against it.

Today I am talking about implementing chaos in production!!!!

After hearing this you might think what I am saying? Am I insane? I am encouraging implement chaos in production, which is the most emotional and sensitive area of a developer, we are all praying whatever the error comes, please those come before production. In production, if something goes wrong your organization's reputation at stake, your organization loses user base, revenue, etc., and I am encouraging you to implement Fault/Chaos.

But the irony is we have the wrong mindset, our mindset should be 'Failure is inevitable and we must prepare for it'. In this tutorial, I am advocating for this culture.

A Simple Microservice Definition

Microservice Architecture is distributed in nature and it consists of suites of small services which can be scaled and deployed independently.

If we deduce the above statement we will find 3 important things:

  1. As Microservice is distributed, it is communicated over the network, and the network is unreliable so how come your Microservice will be reliable?
  2. Over the network, Microservices are communicated to each other so they are dependent on each other, so they can fail if their dependent services fail.
  3. Microservices Scaled and deployed on infrastructure so if infrastructure fails your Microservices will fail.

These points justify the 'Failure is inevitable and we must prepare for it' statement.

But the question is how do we prepare for it? 

The answer is Chaos Engineering.

microservice chaos-engineering

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

The Principles of Chaos Engineering

Improve the resilience of your system by optimizing the high fault tolerance of your infrastructure through Chaos Engineering. Learn more here.

The Principles of Chaos Engineering

The Principles of Chaos Engineering: That said, resilience is not without its challenges. Building microservices that are independent yet work well together is not easy.

Chaos Engineering — How to Break AWS Infrastructure on Purpose

Breaking your System Infrastructure on purpose — Really? Why would anybody do that? Chaos Engineering is a type of Engineering where we test the system’s robustness, reliability and the ability to survive a disaster without manual intervention.

Testing Microservices Applications

In this article, look at different ways to test microservices and how you can have a suitable testing strategy to begin with.

Microservices and Data Management - DZone Microservices

This article describes the nature of microservices applications, contrasts them with monolithic apps, and talk about microservices in data management.