Skip to content

Proposal: SSubscribe should (could) reuse existing connection to node #3574

@maqdev

Description

@maqdev

Existing implementation creates a new TCP connection for every SSubscribe which is inefficient if there are multiple channels located on the same node.

Technically there's a workaround at the user side of the Redis go - instead of calling client.SSubscribe, it's possible to reuse a PubSub and call PubSub.SSubscribe for subsequent channels that are hosted (sharded) to the same node but it requires following cluster topology, keeping track of PubSubs and duplicating sharding logic to the caller.

A proposal is to reuse existing connection pool instead for SSubscribe or maybe create a separate pool for SSubscribe but limit number of connections created to a single Redis node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions