You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
We have been trying to use replication using async-redis driver on multiple ec2 instances and served through application load balancer and using CloudFront.
We have some backend services that triggers some event notifications using pusher-php-server which does not subscribe to channel but instead just trigger an event on the channel.
The problem appears to be on how the message is propagated across servers. For instance, the enduser subscribes on server1 and thus registers the channel on the LocalChannelManager but does not register the same channel on server2. The backend service now triggers an event on server2. However, since the LocalChannelManager instance does not have the channel on server2, the call to broadcastToEveryoneExcept on PusherClientMessage class will not succeed as channel is not defined in that server2.
As a workaround, we have overriden the find method of RedisChannelManager to return an instance of channel by updating the local property as if the channel is registered when not present.
Despite of doing that workaround, it doesn't appear to be working well consistently until we use sticky sessions on target group. It appears that the implementation of pubsub should be reviewed/redesigned to ensure that the message is sent across all instances regardless of where the request is received.
The text was updated successfully, but these errors were encountered:
When the trigger is received on server2 but no clients have subscribed on server2 yet and instead subscribed through server1, the channel is non existent on server2, making the optional($channel) not triggered due to channelManager->find returning null on server2.
When multiple connections are subscribed to a channel and the browser is refreshed triggering unsubscription from one connection, the single connection triggers removal of the channel from set when others are still connected to the channel.
We have been trying to use replication using async-redis driver on multiple ec2 instances and served through application load balancer and using CloudFront.
We have some backend services that triggers some event notifications using pusher-php-server which does not subscribe to channel but instead just trigger an event on the channel.
The problem appears to be on how the message is propagated across servers. For instance, the enduser subscribes on server1 and thus registers the channel on the LocalChannelManager but does not register the same channel on server2. The backend service now triggers an event on server2. However, since the LocalChannelManager instance does not have the channel on server2, the call to broadcastToEveryoneExcept on PusherClientMessage class will not succeed as channel is not defined in that server2.
As a workaround, we have overriden the find method of RedisChannelManager to return an instance of channel by updating the local property as if the channel is registered when not present.
Despite of doing that workaround, it doesn't appear to be working well consistently until we use sticky sessions on target group. It appears that the implementation of pubsub should be reviewed/redesigned to ensure that the message is sent across all instances regardless of where the request is received.
The text was updated successfully, but these errors were encountered: