Skip to content

Patrick Uhlmann

Tag: #performance

Hello World Throughput with Spring Boot

I wondered how many request a simple hello world endpoint would be able to serve with Spring Boot out of the box.

By default Spring Boot uses Tomcat and the setting server.tomcat.threads.max defines the number of threads available for concurrent request handling. By default up to 200 threads can handle requests.

Hibernate Validator Performance

Recently I was investigating a performance problem in a Spring Boot application using Spring Data and Postgres. A request to load a list of items took half a minute. I quickly realized that loading 1'600 items issued 20'000 database requests. After a quick optimization that brought down the number of queries to less than 200 the request still took 15 seconds. I decided that it was time to use a profiler and was surprised to see that almost all time was spent in methods of the Hibernate Validator.

The items were nested and there might be something like 20 annotations in the tree but most of them were just NotNull. I would never have expected this to be so slow.