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.

I used my playground application for the tests. My hardware: Dell XPS 13 9343 with 8 GiB memory and a core i7-5500U.

[Read More]

To limit or not to limit Docker with Spring Boot

I recently asked myself what the difference would be between running a Spring Boot Application in a Docker Container with a limit on resources like CPU or RAM between running it without limit.

I used my playground application for the tests. Furthermore I decided to go with the spring-boot default plugin to build an image. My hardware: Dell XPS 13 9343 with 8 GiB memory and a core i7-5500U.

[Read More]

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.

[Read More]

Nextcloud encryption is dangerous

Recently I decided to maintain an old Nextcloud installation of mine. I moved it to a new server and upgraded it from version 20 to 24 (step by step). I also enabled the groupfolders feature and moved some folders and files from a user to the new groupfolders.

At first everything seemed to work. After a while I got some complaints about files that could not be opened with the web interface. Upon further investigation I saw that the file was encrypted (this is quite easy to see as its content starts with “HBEGIN:oc_encryption_”). There were more and more reports about such files.

[Read More]

Nokia 3310 Import contacts from Nextcloud

I bought a Nokia 3310 3G. In the feature list it found that it supports importing contacts from a vcf file. However in practise it didn’t work. To save you some time researching, here the procedure:

  • Login in the nextcloud webinterface and go to contacts
  • Click on All contacts and then on settings
  • Choose download. This will save a *.vcf file with all your contacts. The format of the vcf file is version 3.0/4.0 (depending on your version), however the nokia 3310 supports only version 2.1. Thus a conversion is needed. I wrote a small utility to do this.
  • Use the utility to convert the downloaded file to the 2.1 format
  • Connect the phone with an usb cable and choose storage
  • Put the file in the 2.1 format on the external card in the folder vCard
  • optional: delete all existing contacts
  • Use the File application on the phone to locate the file. Against intuition, you don’t need to select open but “save vCard”. The process is fast and unspectacular (you don’t see a message at all).
  • Open the contact app again and enjoy your contacts :D

Sources from research:

[Read More]