title: Spring HTTPSession on REDIS is slow
body: <p>I have implemented Spring HTTPSession on REDIS. But however, I find the performance low as compared to spring internal (in memory) HTTP session generation and management. Web server used is TOMCAT 8, JVM is Hotspot and Java version 8.</p>
  
  <p>The implementation is as mention in the following link</p>
  
  <p><a href="https://docs.spring.io/spring-session/docs/current/reference/html5/#httpsession-redis" rel="nofollow">https://docs.spring.io/spring-session/docs/current/reference/html5/#httpsession-redis</a></p>
  
  <p>Following is the output of the Jmeter run kept on the same machine in both the cases:</p>
  
  <ol>
  <li><p>With Redis : ~2800 rps (request per second)</p></li>
  <li><p>Without Redis (Spring Session) : ~7000 rps</p></li>
  <li><p>CPU utilization : 70% - 80%</p></li>
  </ol>
  
  <p>Here is my Jmeter Run Configuration:</p>
  
  <ol>
  <li>POST URL</li>
  <li>Jmeter Threads - 1000</li>
  <li>Rampup 5</li>
  <li>Continuous Loopback</li>
  <li>Run time: 5 minutes</li>
  </ol>
  
  <p>Hardware configuration:</p>
  
  <ol>
  <li>Core i5</li>
  <li>8 GB ram</li>
  <li>4 cores</li>
  </ol>
  
  <p>OS:
  Linux Debian OS</p>
  
  <p>What can be possible reasons for this. Are there any alternate configurations or  implementations to achieve the said performance.</p>
  
  <p>Thanks in Advance.</p>