I maintain a high-traffic meteor app in which 99% of the clients interact with the app in read-only mode. For performance and cost-saving reasons, the clients pull initial data data from CDN. If/when the user logins, changing data becomes possible via newly-created subscriptions.
My understanding (correct me if wrong) is that in Meteor, a DDP connection is established immediately after the initial load. In my app this connection is not actually required until the user logs in. Problem is, the idle websockets are just wasting load-balancer resources and ec2 instance resources, which forces unnecessary horizontal scaling. Also generally, its a no brainer that having the bulk clients hold an idle websocket is just inefficient architecture and bad practice.
Thus my question is:
How do I prevent the Meteor client from opening a websocket right after starting?
There’s http://docs.meteor.com/#/full/meteor_disconnect which closes the DDP, but I can’t seem to find anything in the docs which disables DDP to begin with. Such settings will solve my problem, but other advice is also welcome.