Scaling Redis PubSub with Shahar Mor - Redis Labs

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 25

  • @truthprevails899
    @truthprevails899 День тому

    Here, Service discovery is to find which nodes are exciting at a given time. So each call needs to go thru service discovery. Is there a way to optimize it ?

  • @barmooj
    @barmooj 2 роки тому +1

    There is something missing in the talk, I think the proposed architecture is increasing throughput by making the publisher choose randomly one node at a time to emit the message and if for example there are 4 nodes ,a publisher can in theory emit 4 different messages concurrently

  • @dn5426
    @dn5426 2 роки тому

    At some point you gotta ask yourself it you are using the right tool for the job.

  • @RinaldiMeteoric
    @RinaldiMeteoric 4 роки тому +3

    ok. Now, how do I make a service discovery?

    • @shaharmor
      @shaharmor 4 роки тому +5

      You can just use any service discovery service for that matter, but if you want to use Redis, just make new hosts save their hostname to a redis set key, and have other hosts read from that set constantly.
      You'll have to handle the case of hosts going offline the same way just in reverse basically

  • @1337Hammersmith
    @1337Hammersmith 3 роки тому

    Very Cool, What would it take for you to want to use a SaaS over building & managing your own cluster?

    • @shaharmor
      @shaharmor 3 роки тому +1

      Mostly cost. SaaS based PubSub messaging can get extremely expensive under high usage

    • @1337Hammersmith
      @1337Hammersmith 3 роки тому

      @@shaharmor Is that compared to running these redis clusters and front ends for them, or is your PubSub just internal?

    • @shaharmor
      @shaharmor 3 роки тому +1

      Even internal PubSub services, like the ones provided by cloud providers, will be much more expensive than running your own solution like the one i suggested

    • @1337Hammersmith
      @1337Hammersmith 3 роки тому

      ​@@shaharmor so what are you using for the last mile connection? WebRTC data channels with Socket.io signalling?

  • @GdGdGider
    @GdGdGider 6 років тому +4

    Great talk!

  • @evans8245
    @evans8245 5 років тому +2

    Nice pattern

  • @softwareengineer6702
    @softwareengineer6702 3 роки тому

    I don't get it.. How is it more scalable? Channel names are distributed between nodes?
    Publisher and subscriber is connected to every node, so unless someone explains me, it looks just like cluster: message is replicated to each node.

    • @shaharmor
      @shaharmor 2 роки тому +6

      A publisher sends each message to only one node, compared to Redis Cluster which forwards that message to all nodes

  • @benjamingruenbaum9270
    @benjamingruenbaum9270 6 років тому +1

    Really nice talk

  • @Lapenotheone
    @Lapenotheone 3 роки тому

    Nice solution In that time when you did it it was quite hard to do that, Can I ask that Did you switch to streams?

    • @shaharmor
      @shaharmor 3 роки тому +3

      Hey, we haven't switched to streams, and our pubsub cluster solution is still running in production handling millions of messages per second

  • @MyCarDriving
    @MyCarDriving 3 роки тому

    Looks like still messages were duplicated. Other option could have been distribution of channels across nodes and then using service discovery connect to nodes which hold those channels

  • @soneshengg
    @soneshengg 3 роки тому

    Well, arent messages heavily being delivered multiple times to subscribers in this case ?

  • @mishamovdivar
    @mishamovdivar 3 роки тому

    What happens when a node crashes and has no chance to deregister itself from the service discovery ?

    • @digitalml
      @digitalml 2 роки тому

      couldn't you have 'service discovery' node ping the registered nodes and remove it on timeout ?

    • @shaharmor
      @shaharmor 2 роки тому +5

      It depends on your service discovery solution, but in our case, the Redis key that holds that specific node's hostname would simply expire after a few seconds because it won't be refreshed anymore

  • @yasser2768
    @yasser2768 4 роки тому +2

    "Talk is cheap, show me the code." Linus Torvalds

  • @sacaelcod
    @sacaelcod 8 місяців тому +1

    Increíble solución