This application allows you to send compute intensive HTTP requests to a simple webserver.
switzerchees/go-scaling:latest
# Simple Build
docker build -t go-scaling .
# Multi Platform Build and Push to Docker Hub
docker buildx build --push --platform=linux/amd64,linux/arm64 -t <docker-hub-username>/go-scaling .
/compute/{fibNumber}
: Allows you to calculate the n-th fibonacci number. Produces a lot of load on the http server depends on the number. Don't go higher than 45 if you do you will not get a response until the end of time 😉/escalate
: Behind this endpoint is an empty infinity loop. That means the http server behind will go up to 100% CPU load immediately./stopescalate
: This endpoint will stop the infinite loop.
This command allow you to forward kubernetes ressources running inside your kubernetes cluster and bind it to a port on your local machine for testing purposes.
kubectl port-forward pod/[POD_NAME] [LOCAL_PORT]:[POD_PORT] -n [NAMESPACE]
# Example
kubectl port-forward pod/my-pod 8080:80 -n my-namespace
kubectl port-forward service/[SERVICE_NAME] [LOCAL_PORT]:[SERVICE_PORT] -n [NAMESPACE]
# Example
kubectl port-forward service/my-service 8080:80 -n my-namespace
curl http://localhost:8080/compute/20
-> This will send a http request to the compute endpoint
https://github.com/rakyll/hey?tab=readme-ov-file#installation
hey -z 20s -c 10 http://localhost:8080/compute/30
-> Will make 10 concurrent requests for 30 seconds and outputs a summary after
https://www.inmotionhosting.com/support/edu/wordpress/performance/stress-test-with-apachebench/
ab -n 3000000 -c 10 http://localhost:8080/compute/30
-> Will make 10 concurrent requests for 30 seconds and outputs a summary after
- Linux: https://linuxhint.com/install-siege-ubuntu/
- Mac: https://formulae.brew.sh/formula/siege
- Windows: https://code.google.com/archive/p/siege-windows/
siege -c10 -t1M http://example.com/ http://localhost:8080/compute/30
-> Will make 10 concurrent requests for 1 minute with live output.
https://helm.sh/docs/intro/install/
# Add Bitnami Repo for helm
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
# Install nginx-ingress
helm upgrade --install nginx-ingress bitnami/nginx-ingress-controller --namespace nginx-ingress --create-namespace