This demo shows the effect of using the kubernetes probes for improving the stability of microservices in case of issues with its dependencies.
The solution consists of 2 services running in the kubernetes cluster. One is named Patient, it is calling it's dependency named HttpBin (because it is, well, HttpBin). Patient is an one file .NET web service.
Istio is used to simulate networking issues (50% chance of 100 second delays in calls between Patient and HttpBin). To add Istio to your cluster follow the official documentation.
k6 generates load to the service. Check the test script for details.
Below are instructions for various cases.
Use git tags:
- all-ok: a default configuration (everything work at its max capabilities);
- delays-no-probes: 50% Patient -> HttpBin calls are delayed for 100 seconds;
- delays-liveness-probe: same as above, but liveness probe is active;
- delays-readiness-probe: same as above, but readiness probe is active;
kubectl apply -f ./k8s-manifest.yaml
export TEST_URL=http://your-service.url; ./run-test.sh