Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis vs Service Bus for pub/sub scenario

I have several services in Azure and i would like to sync changes between them using some kind of pub/sub service.

I am looking into Redis and Azure Service Bus.

The data to be synced is very simple - mostly strings up to 100 characters

I would like to know what is the preferred choice for me - or if i am in the right direction..

My requirements are simple:

  1. Low latency - Many small operations
  2. optional - be able to install the solution on-premise and not in Azure
like image 222
Haim Turjeman Avatar asked Feb 01 '16 02:02

Haim Turjeman


1 Answers

Don't use Redis for this. Redis PubSub isn't reliable (it's fire-and-forget). What would happen if no one is listening when Redis publishes a message? It's lost forever, and this means that your services won't be synchronized...

Maybe you didn't hear about Azure Pack. It's not a full Azure on-premises, but it includes Service Bus. It should be no issue if you use it from the public or private cloud.

Note that you might be able to implement reliable messaging using Redis, but not on top of default pubsub.

A possible alternative to both Redis and Service Bus should be RabbitMQ.

like image 125
Matías Fidemraizer Avatar answered Sep 24 '22 23:09

Matías Fidemraizer