Need advice about which tool to choose?Ask the StackShare community!
NSQ vs Redis: What are the differences?
Developers describe NSQ as "A realtime distributed messaging platform". NSQ is a realtime distributed messaging platform designed to operate at scale, handling billions of messages per day. It promotes distributed and decentralized topologies without single points of failure, enabling fault tolerance and high availability coupled with a reliable message delivery guarantee. See features & guarantees. On the other hand, Redis is detailed as "An in-memory database that persists on disk". Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
NSQ belongs to "Message Queue" category of the tech stack, while Redis can be primarily classified under "In-Memory Databases".
"It's in golang" is the primary reason why developers consider NSQ over the competitors, whereas "Performance" was stated as the key factor in picking Redis.
NSQ and Redis are both open source tools. It seems that Redis with 37.4K GitHub stars and 14.4K forks on GitHub has more adoption than NSQ with 15.6K GitHub stars and 2.03K GitHub forks.
According to the StackShare community, Redis has a broader approval, being mentioned in 3261 company stacks & 1782 developers stacks; compared to NSQ, which is listed in 21 company stacks and 8 developer stacks.
I am looking into IoT World Solution where we have MQTT Broker. This MQTT Broker Sits in one of the Data Center. We are doing a lot of Alert and Alarm related processing on that Data, Currently, we are looking into Solution which can do distributed persistence of log/alert primarily on remote Disk.
Our primary need is to use lightweight where operational complexity and maintenance costs can be significantly reduced. We want to do it on-premise so we are not considering cloud solutions.
We looked into the following alternatives:
Apache Kafka - Great choice but operation and maintenance wise very complex. Rabbit MQ - High availability is the issue, Apache Pulsar - Operational Complexity. NATS - Absence of persistence. Akka Streams - Big learning curve and operational streams.
So we are looking into a lightweight library that can do distributed persistence preferably with publisher and subscriber model. Preferable on JVM stack.
Kafka is best fit here. Below are the advantages with Kafka ACLs (Security), Schema (protobuf), Scale, Consumer driven and No single point of failure.
Operational complexity is manageable with open source monitoring tools.
Pros of NSQ
- It's in golang29
- Lightweight20
- Distributed19
- Easy setup18
- High throughput16
- Publish-Subscribe10
- Save data if no subscribers are found7
- Scalable7
- Open source6
- Temporarily kept on disk5
- Simple-to use2
- Load balanced1
- Free1
- Primarily in-memory1
- Topics and channels concept1
Pros of Redis
- Performance882
- Super fast540
- Ease of use510
- In-memory cache441
- Advanced key-value cache321
- Open source191
- Easy to deploy180
- Stable163
- Free153
- Fast120
- High-Performance40
- High Availability39
- Data Structures34
- Very Scalable31
- Replication23
- Great community21
- Pub/Sub21
- "NoSQL" key-value data store17
- Hashes14
- Sets12
- Sorted Sets10
- Lists9
- BSD licensed8
- NoSQL8
- Integrates super easy with Sidekiq for Rails background7
- Async replication7
- Bitmaps7
- Keys with a limited time-to-live6
- Open Source6
- Strings5
- Lua scripting5
- Hyperloglogs4
- Awesomeness for Free!4
- Transactions3
- Runs server side LUA3
- outstanding performance3
- Networked3
- LRU eviction of keys3
- Written in ANSI C3
- Feature Rich3
- Performance & ease of use2
- Data structure server2
- Simple1
- Channels concept1
- Scalable1
- Temporarily kept on disk1
- Dont save data if no subscribers are found1
- Automatic failover1
- Easy to use1
- Existing Laravel Integration1
- Object [key/value] size each 500 MB1
Sign up to add or upvote prosMake informed product decisions
Cons of NSQ
- Get NSQ behavior out of Kafka but not inverse1
- Long term persistence1
- HA1
Cons of Redis
- Cannot query objects directly15
- No secondary indexes for non-numeric data types3
- No WAL1