Built by following official guide here: https://spring.io/guides/gs/rest-service/
Bootstrapped with Initializr.
Select OpenJDK 17.
Dependencies:
- Spring Web
./gradlew bootRun
To verify:
curl http://localhost:8080/greeting
ab -c 50 -n 5000 http://localhost:8080/greeting
k6 run ./api-test.js
https://spring.io/projects/spring-boot/#learn
https://spring.io/guides/topicals/spring-boot-docker/
- Containerize.
- Load test (probably with K6 or ab).
- Setup prometheus client (or other metrics client) + Grafana.
- Observe some key metrics of a Java application, like GC, latency, number of connections etc.