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

Benchmarking Failure #284

Open
balaphp opened this issue Feb 27, 2014 · 8 comments
Open

Benchmarking Failure #284

balaphp opened this issue Feb 27, 2014 · 8 comments

Comments

@balaphp
Copy link

balaphp commented Feb 27, 2014

Hi,
I am testing all the transports in a same way with websocket-bench tool.
Socket.io can stable with 6000 live connections (other transports also gives some closer or less values) but the faye transport not sustaining with even 3000 live connections, the sockets are loosing the connections. when i debug its showing the following error
Flushing connection for -> xxxxx
Closing connection for -> xxxxx.

What is the issue ?
websocket command i have used:
websocket-bench -a 3000 -c 200 -t faye -w 2 -k (faye server URL)

@jcoglan
Copy link
Collaborator

jcoglan commented Mar 2, 2014

Can you fully describe your setup for this test? I've tried running the command you gave against the Faye example server and it doesn't attempt to subscribe to any channels or publish any messages.

I'm also skeptical about a 'websocket benchmark' tool that compares systems that are very different from one another in scope (Socket.IO and Faye), and therefore measures a lot of stuff that it not related to websockets.

@jcoglan
Copy link
Collaborator

jcoglan commented Mar 2, 2014

It's also unrealistic to have that many connections made at the same time, from the same process on the same machine.

@jcoglan
Copy link
Collaborator

jcoglan commented Mar 2, 2014

What I have discovered is that, in the cases where websocket-bench reports connection errors, the Faye server never received a handshake request. The server processes every requests it receives successfully; it simply doesn't receive the full quota of the requests that websocket-bench tries to send.

This could be due to descriptor limits either within the OS or within Node; each Faye client sends an HTTP request and opens a WebSocket during the handshake process. Using keep-alive is probably not advisable since you don't need the first HTTP request's TCP connection to stay open once you've got a WebSocket open.

@jcoglan
Copy link
Collaborator

jcoglan commented Mar 2, 2014

I've tried disabling WebSocket support on the clients that websocket-bench creates, and this removes all the connection errors. So, I think it's simply a case of trying to open far too many TCP connections from a single Node process.

@balaphp
Copy link
Author

balaphp commented Mar 3, 2014

I have created one faye server which is filtering /meta/rpc/ messages from the publisher.
It simply print the messages from publishers. Benchmark.js file contains the publisher code
this will send the publisher date time(message) to faye server each one second. In websocket-bench tool i have set it up as a live connections.
server-limit
error

I have attached screenshots for server limit and error.
This is the code i have used for faye and socket.io
https://github.com/balaphp/faye-test

@balaphp
Copy link
Author

balaphp commented Mar 19, 2014

Hi,
Have u checked that code ?

@man2
Copy link

man2 commented Jul 14, 2014

what happen with this? is it solved?

@jcoglan
Copy link
Collaborator

jcoglan commented Jul 15, 2014

Sorry, I was swamped with work at the time and I'm still catching up on things. I'm not sure what I'm supposed to be checking about the above code. @balaphp What exactly did you want me to look at, and what questions do you have about the code? Have you observed what I noticed, which is that the server doesn't receive all the messages sent to it?

Since you mention the 'flush connection' message, I wonder whether you're seeing a manifestation of some of the issues described in #307, which were fixed in 630190d.

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

3 participants