meteor-feature-requests
meteor-feature-requests copied to clipboard
DDP - Ability to limit message size
Hello,
I'm wondering if theres an easy way to limit the size of DDP messages sent to the server.
Problem
Currently, the DDP server is using sockjs-node for websockets (found here in Meteor) which appears to consume messages with no size limit.
If enough large DDP messages are sent to the server (say, spamming Meteor.call('test', Array(1000000)) over and over) I imagine performance will take quite a hit due to memory consumption.
Solution
Some websocket libraries like websockets/ws allow a 'maxPayload' argument for messages, which could be switched in place of sockjs. I don't know enough about the Meteor code to attempt this unfortunately.