Middleware Performance

Middleware Performance Example

Compare performance impact of different middleware configurations.

Running

go run main.go

Server starts on http://localhost:3004

Benchmarking

Use ApacheBench to test performance:

ab -n 1000 -c 10 http://localhost:3004/baseline
ab -n 1000 -c 10 http://localhost:3004/light
ab -n 1000 -c 10 http://localhost:3004/heavy

Endpoints

Key Insights