Redis vs Service Bus for pub/sub scenario [closed]
Asked Answered
P

2

11

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
Perretta answered 1/2, 2016 at 2:2 Comment(3)
This question is off-topic for StackOverflow, as it is very broad and opinion-soliciting. No right answer; just opinions. Also: "high speed and low latency" is wide-open to interpretation, and could possibly be satisfied by either choice. Same goes for "simple enough". No idea what "data is very simple" means. And both solutions are available on-premises.Phytophagous
I have edited the question but i still think is on-topic. I would like to hear opinions.. that's the point, learn from others who know better than me and hear all kind of opinions to help me make the right decision.Perretta
I agree - it can make a lively discussion. But... That's the thing: StackOverflow isn't the place to discuss opinions and have lively discussions. There's no objective answer that can be posted here. And your edits don't make it any less off-topic.Phytophagous
F
16

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.

Franky answered 1/2, 2016 at 8:53 Comment(1)
This answer could do woth an update since redis supports reliable messaging through streams now.Erudite
J
1

We are currently using Redis as our service bus within Azure and it works well. We chose this option primarily because it was very easy to implement and we had to have something that would work on-prem.

We use both the pub/sub feature and the reliable messaging through streams. Because we work with real time data that has a limited life time if we miss a message via pub/sub then it's not critical. We use the streams with acks for more critical data such as processing alarms etc.

We considered many alternatives including Service Bus (expensive for high volume and not easy to implement on-prem) and RabbitMQ. The latter is great but didn't offer anything more than Redis (for us) and Azure offers Redis as a hosted service so takes 2 minutes to setup.

Josie answered 5/4 at 8:31 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewMunificent

© 2022 - 2024 — McMap. All rights reserved.