Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For browser,maximum socket buffer size before throttling #568

Closed
uvshah opened this issue Mar 14, 2017 · 4 comments
Closed

For browser,maximum socket buffer size before throttling #568

uvshah opened this issue Mar 14, 2017 · 4 comments

Comments

@uvshah
Copy link

uvshah commented Mar 14, 2017

Hello,

I am using browserify MQTT.js for websocket.
From single socket client, I am sending 1K messages(32KB size) at a time.
After few messages, my client gets disconnected.
Now I tried with increasing browser buffer size from
var bufferSize = options.browserBufferSize || 1024 * 512 // 512KB To
var bufferSize = options.browserBufferSize || 1024 * 1024 * 1024 //1 GB

In that case it works fine.

  1. What should be maximum browser socket buffer size?
  2. Is it right way to resolve my issue?

Regards,
Urmik

@mcollina
Copy link
Member

I think sending 1k messages and process them as a single unit is not what MQTT is built for.
Where are you setting this browserBufferSize option?

@uvshah
Copy link
Author

uvshah commented Mar 14, 2017

Thanks for reply.
I am just trying to do loadtesting from MQTT.js browserify client to Mosca server.
I am setting "browserBufferSize" option in client side browserify MQTT.JS. (function Name - WebSocketStream);

@mcollina
Copy link
Member

why is it disconnected? Either the browser or the broker are emitting some logs?

@cordovapolymer
Copy link

cordovapolymer commented Mar 14, 2017

@urmik, I tried heavy loading mqtt.js with mosca and it works fine. Can you publish your code or test it with this https://github.com/mcollina/aedes/files/793556/Archive.zip from moscajs/aedes#88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants