Cloud Computing, DevOps

6 Mins Read

Application Health Check Using Chaos Engineering

Voiced by Amazon Polly

Introduction

Chaos Engineering

Chaos engineering is a method of testing distributed software to ensure that it can resist unexpected interruptions is known as chaos engineering. It is based upon concepts from chaos theory, which emphasizes unpredictable and random behavior. Chaos engineering seeks to pinpoint systemic weaknesses through carefully orchestrated experiments that induce random and unpredictable behavior.

Software testing and quality control are methods used in chaos engineering. It is the right match for modern distributed systems and processes. It tests and makes corrections to a system, unlike stress testing and it mainly aims to gain knowledge about the system.

Customized Cloud Solutions to Drive your Business Success

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

Principles of Chaos Engineering

  • Build a hypothesis around a steady state behavior

The first rule of chaos engineering is to concentrate on a system’s measurable output rather than its internal characteristics. To determine the system’s steady state by monitoring that output for a brief period.

  • Vary real word events

Chaos variables represent actual occurrences, particularly failures of hardware and software as well as non-failure events like a spike in traffic. The frequency or possible impact of each event determines its priority.

  • Run experiments in production

The most exact simulation of the production environment is typically used to conduct chaos experiments. This is a safeguard to avoid the worst-case situation that might happen when testing in a live environment.

  • Automate experiments to run continuously

It should automate an experiment to examine a wider variety of conditions once it has been set up, with its outputs documented and its range of conditions defined.

  • Minimize the blast radius

Production experimentation is a risky step small occurrences can be dealt with quickly, but the chaos engineer must make sure that any consequences are controlled and kept to a minimum.

Steps to Perform WordPress Application Health Check

  1. Update package list for upgrade

step1

2. Install python3 and python3 virtual environment

step2

3. Create virtual environment

step3

4. Activate the environment

step4

step4b

5. Install Helm

step5

step5b

step5c

step5d

step5e

step5f

6. Add repo to nginx-stable

step6

7. Get update from the repository

step7

8. Install nginx controller in the namespace ingress-basic

step8

step8b

step8c

9. To deploy the WordPress application, add a repository that is azure marketplace

step9

10. Get an update from the repository

step10

step10b

step10c

Make changes in /tmp/values.yaml

11. Enable autoscaling to true

step11

12. Enable ingress to true

step12

13. Make persistence enabled to false

step13

14. Make persistence enabled to false in MariaDB Primary Persistence parameters

step14

15. Change the service type of WordPress from Load Balancer to ClusterIP since we are running on the nginx controller

step15

16. Add annotations and save the file

step16

17. Install helm chart, to deploy the WordPress application

step17

step17b

step17c

18. Check whether pods are running

step18

step18b

19. Add ModHeader to Chrome

step19

20. To access the WordPress application from the web copy and paste the External Ip address

step20

step20b

21. To check whether the application is running and deployed properly access using the IP address.

step21

step21b

22. Copy and paste the content, which contains the steady state hypothesis: to check whether all the pods running in the namespace web app is in a healthy state.

step22

step22b

23. Run the health.yaml file to check whether the app is healthy,

Here, the experiment failed and deviated when it tried to probe whether all the pods are healthy or not within the namespace web app. It found the system is in unhealthy state.

step23

24. Kubernetes action is taken time to create the pod

step24

25. To run the application successfully need to add pause:20 sec in /tmp/health.yaml file, within those 20 seconds deployment will take an action and recreate the pod

step25

step25b

step25d

step25c

Conclusion

Hence, the application ran successfully after adding pause:20 sec in /tmp/health.yaml file, within those 20 seconds deployment will take an action and the pod will be recreated. 

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.

Drop a query if you have any questions regarding Chaos Engineering and I will get back to you quickly.

To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.

FAQs

1. Why Chaos Engineering is applied in health check?

ANS: – Unlike conventional testing, Chaos Engineering evaluates software applications and systems through experiments and unexpected pairings. By doing this, firms broaden the testing and examine how the program will function in unexpected circumstances.

2. What is the Steady State Hypothesis in Chaos Engineering?

ANS: – For the experiment to reveal information concerning weaknesses when contrasted against the specified “normal” limits of what is measured, a steady state hypothesis (SSH) specifies “what normal looks like” for the system. The Steady State Hypothesis serves two roles in the Chaos Toolkit. Before experimenting, it is used to ensure that the target system is in a recognized normal state. The results offered by the experiment’s report are formed using it as a template for comparison of the state of your system after the experiment has been run.

WRITTEN BY Abhilasha D

Abhilasha D is a Research Associate-DevOps at CloudThat. She is focused on gaining knowledge of Cloud environment and DevOps tools. She has keen interest in learning and researching on emerging technologies.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!