title: Should I use pull (AJAX) or push (WebSocket) to scale for large amount of users?
body: <p>I need my web app to scale to 10,000 users. I need to implement a functionality which notifies the user about certain events, for example, the job that you submitted has finished, you have new suggestions to optimize and so on. I'm thinking of 2 implementation strategies:</p>
  
  <p>(pull) Every minute to send an AJAX request to the server to ask for new notifications if there are any</p>
  
  <p>(push) To use WebSocket and notify user when there is a new notification</p>
  
  <p>Which one would be recommended?</p>
  
  <p>DETAILS ABOUT THE WEB APP:</p>
  
  <p>The Backend language that I'm using is Java running on tomcat 6 (yes, I saw that only tomcat 8 begins to support WebSocket so I might end up having to upgrade).</p>
  
  <p>The application is a single-page web app. This notification feature is not necessary to be real-time, I'm just concerned with which option is more scalable.</p>
  
  <p>Requests are dealt with via AJAX.</p>