Skip to content

Add redis cluster broker and result-backend #9

Description

@steigerung

Adding the Redis Cluster broker and result-backend out of the box would be nice advantage, relative to alternative task queues.
But wouldn't it be redundant?

If this idea seems relevant to you, there are some implementation issues.
Using redis-py there is no problem with developing a result-backend, but there are some problems with the broker, more specifically redis.asyncio.RedisCluster client doesn't support pubsub, so it seems the only way to implement AsyncBroker correctly is to initialize redis.asyncio.RedisCluster and subscribe on tasks kicks channel in any master-node through redis.asyncio.Redis, as long as it is alive and switch to another if the current master-node is not working.

Activity

  1. steigerung commented on Sep 12, 2022

    @steigerung
    Author
  2. chandr-andr commented on Sep 12, 2022

    @chandr-andr
    Member

    @steigerung Hi!
    I apologize for the long feedback.
    The proposal to use a Redis Cluster is extremely interesting.
    I will try to make an MVP that can implement your idea.

  3. stinovlas commented on Nov 6, 2023

    @stinovlas
    Contributor

    I'm interested in this. As I see it, implementing support for redis cluster in result backend should be trivial, because it doesn't use PUB/SUB. It only uses SET, EXISTS, GET and GETDEL which are all supported by redis cluster in redis-py.

    Even if we only did this, it would still be an improvement, because there are multiple brokers available for taskiq, but only one result backend (at least that's what the official taskiq docs suggests).

    I'm willing to implement changes for result backend to support cluster mode. Expect a PR in a few days :-).

  4. pinguingman commented on Nov 10, 2023

    @pinguingman
    Contributor

    Hi @s3riusI
    Saw that you accepted the pool request, when can I expect a new version of the library? I'm really looking forward to these changes

  5. s3rius commented on Nov 10, 2023

    @s3rius
    Member

    Hi! I guess we can safely release it now. Because these changes are backward compatible.

  6. pinguingman commented on Nov 10, 2023

    @pinguingman
    Contributor

    Are there any plans to create a ListQueueBroker and a PubSubBroker with cluster support?

  7. s3rius commented on Nov 10, 2023

    @s3rius
    Member

    Sure. I'm not certain about PubSub support. Because in cluster mode it's a bit tricky. But anyway it sounds like a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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