go-vs-spring-bench
· 1 min
gojavapostgresqldocker
Two implementations of the same 14-endpoint REST API, one in Go and one in Spring Boot, are compared under load on the same data store (PostgreSQL 18 or in-memory Valkey 8) with identical Docker resource limits: throughput, latency, CPU time per request, data wait time, RAM, cold start, image size and build time.
What is inside?
- Everything runs in Docker: no need to install Go, Java, Maven, Python or k6.
- Two data stores (
--stores postgres,valkey) and any CPU/memory limits you like (--limits 1:1g,0.5:512m). - A cold round with no warm-up, to see the first minute of a fresh container.
- Logic endpoints: base64, factorial, and daily/monthly sales reports computed in application code or in the data store.
- Results are collected into a single HTML report.
docker compose run --rm runner --quick
Results: Java vs Go.