DDP ( websocket ) data consumption for ping/pong

I am developing a mobile app for tablets using Meteor ( Cordova ).
App needs to work all the time ( 24/24 ) and i need to choose a data plan ( 3G, 4G, M2M, etc).
I need to know the bandwidth used by Meteor Websocket just to keep connection open ( without including the actual data from publications and methods ).
Let’s say for and hour, how many bytes ?


DDP ping pong is almost nothing. Just a wild guess it should be below 2 MB per month even if you keep the app open 24/7.
I have an android app used 8 hours a day on weekdays. Each user adds 100-200 new records with average 1K record size. It adds up to 30 MB per month. I have to mention it subscribes only to logged in user and another collection with 10-20 records.


Check out https://github.com/meteor/meteor/blob/8005532f4ba847d3e8bb4c1100d09bf53136ff0a/packages/ddp-client/livedata_connection.js#L37

And here’s the spec: https://github.com/meteor/meteor/blob/0963bda60ea5495790f8970cd520314fd9fcee05/packages/ddp/DDP.md#heartbeats

Ping interval is actually configurable. The message ({ msg: 'ping' }) itself is 14 bytes long for the ping and 14 bytes for the pong.

Using the defaults and accounting for latency, you’d probably be looking at a ballpark estimate of 3-4MB inbound/outbound total data transfer per month.


Hi Serkan,
When I tried to change connection heartbeatInterval it didn’t have any effect.
Using lines below changed the interval to approximately 30 seconds.
Meteor.server.options.heartbeatInterval = 30000;
Meteor.server.options.heartbeatTimeout = 30000;

Any higher values like 60000 caused it to revert to default.
Any ideas why ?

There might be a websocket timeout setting somewhere else.