Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Cluster module with pauseOnConnect failed transactions #25594

Closed
zhonked opened this issue Jun 29, 2015 · 1 comment
Closed

Cluster module with pauseOnConnect failed transactions #25594

zhonked opened this issue Jun 29, 2015 · 1 comment

Comments

@zhonked
Copy link

zhonked commented Jun 29, 2015

Hi,
I'm attempting to use the cluster module to implement sticky sessions for use with socket.io based on the recommendations from socket.io:
http://socket.io/docs/using-multiple-nodes/

and examples found here:
https://github.com/indutny/sticky-session
https://github.com/elad/node-cluster-socket.io

It appears however that something in the passing of sockets/fds between master and worker is causing failed transactions when run against siege.

This issue was discussed here:
elad/node-cluster-socket.io#10

Test code has been pushed here, unfortunately not in the form of a real unit test yet:
https://github.com/zhonked/node-cluster-sticky-test

Thanks for taking a look!

@cjihrig
Copy link

cjihrig commented Jun 29, 2015

@zhonked are you able to reduce the test case?

If this is a manifestation of the same original problem, then this might need to be solved in the C++ layer. @bnoordhuis the problem is that accepted connections are read immediately. Is it possible to optionally forgo the uv_accept() call in TCPWrap and still pass the socket to another process. This would require exposing uv_accept() to JavaScript as well.

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

No branches or pull requests

3 participants