1

I was wondering what should be the ideal value for -Djavax.net.ssl.sessionCacheSize for java service which is about to goto production. I know we can fine tune it later but what should be initial value.

I did some research and figured out that it is recommended not to keep it default on old jdk version.

bash-4.2$ java --version
openjdk 17.0.7 2023-04-18 LTS
OpenJDK Runtime Environment Zulu17.42+20-SA (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.42+20-SA (build 17.0.7+7-LTS, mixed mode, sharing)
Ajay Kumar
  • 586
  • 5
  • 21
  • 3
    Too broad. How many concurrent clients are you expecting? How long is the average session? What is wrong with the default value of 20480 in your case? – user207421 Jul 12 '23 at 12:04
  • I am expecting 20 concurrent not more than that. And average session is somewhat 45sec to 1 minute. – Ajay Kumar Jul 12 '23 at 12:17
  • also; exactly what is the impact of this variable when the service takes somewhat a minute to process and return the response for a single client. and incase of concurrent requests, this might be even higher. – Ajay Kumar Jul 12 '23 at 12:20
  • The value has been set to 20480 because Amazon requested this size (https://bugs.openjdk.org/browse/JDK-8210985) and therefore should fit most applications. – Thomas Kläger Jul 12 '23 at 12:49
  • When you write _I did some research and figured out that it is recommended not to keep it default on old jdk version._: how old is the JDK version that you try to use? The default value was changed in 2019/2020 for Java 8u261 and later, Java 11.0.5 and later and all Java version 12 and later. If you are using Java versions older than these then maybe you should set it to 20480. But I read from your question that you use Java 17 which already has the updated default value. – Thomas Kläger Jul 12 '23 at 19:04

0 Answers0