This is more a Java consideration than a purely SQ one. As explained on the JavaDoc (** Address Cache** at the end), results of DNS lookups are cached.
I don’t know the default value, it likely depends on the JVM implementation you use.
The Amazon doc gives good explanations on the topic, and a way to solve the issue.
Thank you Antoine for your answer. However I’m using the official docker image (https://hub.docker.com/_/sonarqube) and would prefer not to customize it manually.
One other point is that TTL is not fixed here, it varies depending on several elements, so best would be for each DNS request to cache it on the TTL providen by the DNS itself in its answer, the source of trust.
Good point indeed. But again, I’m quite sure it’s Java internal stuffs that we are dealing with here, nothing specifically implemented in SQ, so we don’t have control I’d say.
As you use the SQ Docker image, I know which JVM you use, so I’ll try to reproduce and see what could be done. BTW, SQ 8.3.1 docker image had been released, and as we changed the base image (from openjdk:11-jre-slim – to – alpine:3.11 with AdoptOpenJDK jdk-11.0.6+10) so it is possible that this behaves differently. Could you give it a try and trigger an IP change of GitLab on your infra?