How can I monitor subscription quantity on LiveQueryServer?

How long will live subscriptions on the server after network disconnect?
What else conditions for dropping subscriptions except subscription.unsubscribe()?

Worry a bit about possible memory leaking, if I couldn’t unsubscribe all fleeting subscriptions on the client.

Take a look here. There is ws_connect/ws_disconnect events that you can use to monitor the quantity of ws connections. If the client network disconnects, the events should fire as well and the server should handle that.

After ws_disconnect will server automatically drop all subscriptions from this client?
Will it instantly or there will be delay (timeout)?
Will client continouslly try to reconnect via ws or it must be handled manually?

NO, but you can listen to ‘subscribe’ event and block the client if needed.

Instantly.

Yes, is the default behaviours if the Parse client, I don’t remember if you can change it, search on the docs.

So server will store subscriptions (that was not unsibscribed) from disconnected clients forever (or untill restart)?

I think server just handler the events, don’t save it anywhere. If you want to save you can, like I’ve said, listen to the events and save it on a custom Class.

But server must know about what, whom and after what event it must send data. It seems to me server need to store that info, like Subject from Observer pattern.
But also I see thay nobody here don’t concern about that so may be my anxiety useless too.