Skip to content

Alkindi42/probelet

Repository files navigation

Probelet

CI Release Docker License

Probelet provides minimal failure primitives for platform testing.

It can be used either as an HTTP service or as a local CLI for controlled stress workloads.

It combines the simplicity of tools like httpbin with controlled system stress capabilities, making it ideal for:

  • testing Kubernetes liveness and readiness probes
  • validating autoscaling (HPA)
  • simulating slow or failing upstream services
  • debugging timeouts and retry logic
  • inspecting incoming HTTP requests
  • exercising observability and monitoring stacks
  • running controlled CPU, memory, and disk stress locally or over HTTP

Why Probelet exists

Modern platforms rely on mechanisms such as retries, autoscaling, circuit breakers, and readiness probes to react to failure.

However, the conditions that trigger these mechanisms are rarely exercised deliberately. Most systems are validated on the happy path, while their behavior under degradation is often discovered only during incidents.

Probelet was created to make these failure conditions easier to reproduce.

It exposes minimal primitives that allow engineers to simulate response delays, transient errors, resource pressure, and readiness changes in a controlled and observable way.

This makes it possible to exercise platform reliability mechanisms — retries, autoscaling, health checks, and monitoring pipelines — without introducing complex test environments.

If you're interested in the ideas behind this tool, you can read the article:

👉 You don’t test platform reliability until you test failure semantics


🚀 Installation

Docker

docker run --rm -p 8000:8000 ghcr.io/alkindi42/probelet:latest

Verify it’s running:

curl http://localhost:8000/healthz

Expected response:

{"ok":true,"message":"healthy"}

Binary

Download a release from: https://github.com/Alkindi42/probelet/releases.

Example:

tar -xzf probelet-<version>-linux-amd64.tar.gz
./probelet serve

macOS

When downloading the binary directly, macOS may block execution due to Gatekeeper quarantine.

You can remove the quarantine attribute with:

xattr -d com.apple.quarantine ./probelet

📚 API documentation

Probelet provides an interactive API reference powered by OpenAPI and Scalar.

The documentation describes all available endpoints used to simulate application behavior, failure scenarios, and system stress workloads.

Public documentation

https://alkindi42.github.io/probelet/

Local documentation

When running Probelet locally: http://localhost:8000/docs

OpenAPI specification: http://localhost:8000/openapi.yaml

🔐 Authentication

Probelet can optionally protect selected endpoints with a static token.

Set the PROBELET_TOKEN environment variable when starting the service:

PROBELET_TOKEN=my-secret-token ./probelet serve

Then send the token in the X-Probelet-Token header when calling a protected endpoint:

curl -H "X-Probelet-Token: my-secret-token" "http://localhost:8000/delay?duration=5s"

Public endpoints remain accessible without authentication:

  • /
  • /healthz
  • /readyz
  • /docs
  • /openapi.yaml

🧪 Examples

API

Simulate a slow service:

curl "http://localhost:8000/delay?duration=3s"

Trigger CPU pressure:

curl "http://localhost:8000/stress/cpu?duration=10s&cores=max"

Return a specific HTTP status:

curl http://localhost:8000/status/503

Inspect an incoming request:

curl http://localhost:8000/echo

Trigger disk pressure:

curl "http://localhost:8000/stress/disk?duration=10s&size=256Mi" 

Simulate an intermittently degraded upstream:

probelet stress memory --duration 30s --size 256Mi

CLI

Run CPU stress:

probelet stress cpu --duration 10s --cores max

Run memory stress:

probelet stress memory --duration 30s --size 256Mi

Run disk stress:

probelet stress disk --duration 30s --size 256Mi

Print the version:

probelet version

☸️ Kubernetes

A minimal Kubernetes example is available in examples/kubernetes/.

kubectl apply -f examples/kubernetes/
kubectl port-forward svc/probelet 8000:8000

Then try:

curl http://localhost:8000/healthz
curl http://localhost:8000/status/503
curl "http://localhost:8000/stress/cpu?duration=5s"

🧠 Design principles

  • Safe by default: bounded stress, no background jobs
  • Stateless: no persistence, easy to reset
  • Orchestrator-agnostic: Kubernetes, Nomad, Docker, bare metal
  • Observable: deterministic behaviors, simple APIs

🤝 Contributing

Contributions and ideas are welcome.
Feel free to open an issue or a pull request.

📄 License

This project is licensed under the MIT License.

About

A lightweight service for HTTP debugging, API simulation, and controlled CPU or memory stress testing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages