...

/

Terminating Application Dependencies

Terminating Application Dependencies

This lesson will cover a chaos experiment carried out to check how the application behaves if we terminate a replica of the database.

There’s one more thing within the area of what we’re exploring that we might want to try. We might want to check what happens if we destroy an instance of a dependency of our application. As you already know, our demo application depends on MongoDB. We saw what happens when we destroy an instance of our application. Next, we’ll explore how the application behaves if we terminate a replica of the database (the dependency).

Inspecting the definition of health-db.yaml

We are going to take a look at yet another chaos experiment definition.

Press + to interact
cat chaos/health-db.yaml

The output is as follows.

version: 1.0.0
title: What happens if we terminate an instance of the DB?
description: If an instance of the DB is terminated, dependant applications should still be operational.
tags:
- k8s
- pod
- http
configuration:
  ingress_host:
      type: env
      key: INGRESS_HOST
steady-state-hypothesis:
  title: The app is healthy
  probes:
  - name: app-responds-to-requests
    type: probe
    tolerance: 200
    provider:
      type: http
   
...
Access this course and 1400+ top-rated courses and projects.