title: Web Sockets vs Interval Polling
body: <p>I'm currently looking for the best fitting solution to handle notifications. My current options are either using websockets or just do a polling (only 1 request every minute, no long polling, no permanent polling)</p>
  
  <p>I somehow have problems to find performance indicators for these methods. The result should be able to handle a lot of users in parallel without taking too much resources.</p>
  
  <h2>Option A:</h2>
  
  <ul>
  <li>Every 30 Seconds a request is sent to check if the users has a new notification</li>
  </ul>
  
  <h2>Option B:</h2>
  
  <ul>
  <li>Each users holds a websocket connection and is directly informed about a new notification</li>
  </ul>
  
  <p>In the backend i'm using java spring with spring boot. Do you know any best practices or reference implementations?</p>