I am working in a project that is using SSE aproach to push data from server to the browser each 0,5 seconds.
It grabs data from Mysql transform it in JSON and sends it to the browser.
I was wondering in an extreme scenario, where the browser will be working for some months (it is possible). The server sends to the browser 2.764.800 JSON per day. That will be 82.944.000 push per month.
So is there something to be concerned in this scenario? I mean, is there any way where the browser will be overloaded or the client system by such amount of data?
Is there any scenário that could justify a page refresh every X seconds?
Without some more specific details, the answer is "maybe, but probably not [a need to have a page refresh]".
As far as I know, there is no particular limit in the SSE side of things. So, in the quite typical example of receiving a data item from the server, updating the value in a div, and not storing the received data, there should be no growth in memory. Twice a second is also fine.
If you are storing data (e.g. to graph the last N values), you need to make sure values older than the last N are thrown away regularly.
My concerns would be everywhere else:
You might also ask yourself how long people will keep their browsers open, and if this is even something you need to worry about.
In trading applications, I find the close of market (whether daily, or Friday evening) is a good point to deliberately close the socket.