hello-world-go
A simple Go server that demos routing.
Running Locally
# Build and start server
make
Running with Docker-Compose
make docker-build
docker-compose up -d
curl http://localhost:7899/id
docker-compose stop
Running in Minikube
Install Docker (for Mac, for Windows), hyperkit, and minikube.
Sometimes I have to minikube stop; minikube delete; rm -rf ~/.minikube; brew cask reinstall minikube
.
Minikube load balancing demo
Here's a quick demo of load balancing in minikube
# Start the cluster. Takes a minute. Be patient.
make mk-start
# Build the Docker image, start your K8S services + deployments
make mk-build kb-create
# Wait for your pods to start
# kubectl get svc,deploy,po
kubectl get --watch po
# Hit the endpoint multiple times and observe load balancing in action
for i in $(seq 1 7); do printf "Request #$i: "; curl $(minikube service hello-world-go-api --url)/id; echo ""; done
Benchmarks
Load tests show nearly 80k requests per second.