Friday, 23 August 2013

Should I use pull (AJAX) or push (WebSocket) to scale for large amount of users?

Should I use pull (AJAX) or push (WebSocket) to scale for large amount of
users?

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:
(pull) Every minute to send an AJAX request to the server to ask for new
notifications if there are any
(push) To use WebSocket and notify user when there is a new notification
Which one would be recommended?

No comments:

Post a Comment