Redis
 sql >> база данни >  >> NoSQL >> Redis

Как работи механизмът за абонамент на Redis PubSub?

Салваторе/създателят на Redis е отговорил на това тук:https://groups.google.com/forum/#!topic/redis-db/R09u__3Jzfk

All the complexity on the end is on the PUBLISH command, that performs
an amount of work that is proportional to:

a) The number of clients receiving the message.
b) The number of clients subscribed to a pattern, even if they'll not
match the message.

This means that if you have N clients subscribed to 100000 different
channels, everything will be super fast.

If you have instead 10000 clients subscribed to the same channel,
PUBLISH commands against this channel will be slow, and take maybe a
few milliseconds (not sure about the actual time taken). Since we have
to send the same message to everybody.



  1. Redis
  2.   
  3. MongoDB
  4.   
  5. Memcached
  6.   
  7. HBase
  8.   
  9. CouchDB
  1. Desktop Redis Vue

  2. Достъп до променлива извън redis конвейерна функция на Laravel

  3. Транзакционно създаване с валидиране в ServiceStack Redis Client

  4. LogicException:Моля, уверете се, че разширението PHP Redis е инсталирано и активирано

  5. Как да поправите едностранни хеш слотове в Redis