Skip to content
Discussion options

You must be logged in to vote

nstances of Relay\Cluster class with same seeds (ie 3 master nodes) and same connection parameters (like context.stream), eventually 6 persistent connections get created.

Yes, if the two Relay\Cluster objects are alive at the same time, they will not share connections. The way Relay stores persistent socket connections is per instance, so in theory each individual connection could be reused by a different Relay\Cluster object but not if they are both active at the same time.

The reason we don't do multiplexing like that is because of shared state.

$rc1 = new Relay\Cluster(NULL, ['localhost:7000']);
$rc2 = new Relay\Cluster(NULL, ['localhost:7000']);

$rc1->multi();
$rc1->set('foo', 'bar')…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dorrogeray
Comment options

Answer selected by dorrogeray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants