Need advice about which tool to choose?Ask the StackShare community!

NSQ

140
349
+ 1
148
Redis

58.1K
44.7K
+ 1
3.9K
Add tool

NSQ vs Redis: What are the differences?

Introduction:

NSQ and Redis are both popular tools used for message queuing and storage in distributed systems. While they serve similar purposes, there are significant differences between the two that can impact the design and performance of your system.

  1. Data Persistence: NSQ does not provide built-in data persistence, which means messages are not stored on disk by default. On the other hand, Redis is an in-memory data structure store that can persist data to disk.

  2. Message Ordering: NSQ does not guarantee message ordering, so messages can be processed in a different order than they were received. In contrast, Redis provides options for ordered data structures, allowing you to maintain message ordering if necessary.

  3. Scaling: NSQ is designed for horizontal scaling by running multiple instances and distributing load, making it suitable for high throughput scenarios. While Redis also supports clustering for scaling, it relies on a single-threaded model which may become a bottleneck for some use cases.

  4. Message Retention: NSQ allows you to configure message retention duration, after which messages will be automatically removed from the system. Redis, being a persistent data store, retains messages until explicitly deleted or expired based on set time-to-live (TTL).

  5. Protocols: NSQ uses a custom binary protocol for communication between producers and consumers, providing optimized performance for message passing. Redis, on the other hand, supports various protocols like Redis protocol, Memcached protocol, etc., making it more versatile but potentially less efficient for specific use cases.

  6. Use Cases: NSQ is well-suited for scenarios requiring high message throughput, fault tolerance, and easy horizontal scalability. Redis, with its rich set of data structures and features like transactions, pub/sub, and Lua scripting, is often favored for use cases where complex data manipulation and querying are required alongside message queuing functionality.

In Summary, NSQ and Redis differ in data persistence, message ordering, scalability, message retention, protocols, and ideal use cases.

Advice on NSQ and Redis
Pramod Nikam
Co Founder at Usability Designs · | 2 upvotes · 518.3K views
Needs advice
on
Apache ThriftApache ThriftKafkaKafka
and
NSQNSQ

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.

See more
Replies (1)
Naresh Kancharla
Staff Engineer at Nutanix · | 4 upvotes · 515.8K views
Recommends
on
KafkaKafka

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.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of NSQ
Pros of Redis
  • 29
    It's in golang
  • 20
    Distributed
  • 20
    Lightweight
  • 18
    Easy setup
  • 17
    High throughput
  • 11
    Publish-Subscribe
  • 8
    Scalable
  • 8
    Save data if no subscribers are found
  • 6
    Open source
  • 5
    Temporarily kept on disk
  • 2
    Simple-to use
  • 1
    Free
  • 1
    Topics and channels concept
  • 1
    Load balanced
  • 1
    Primarily in-memory
  • 886
    Performance
  • 542
    Super fast
  • 513
    Ease of use
  • 444
    In-memory cache
  • 324
    Advanced key-value cache
  • 194
    Open source
  • 182
    Easy to deploy
  • 164
    Stable
  • 155
    Free
  • 121
    Fast
  • 42
    High-Performance
  • 40
    High Availability
  • 35
    Data Structures
  • 32
    Very Scalable
  • 24
    Replication
  • 22
    Great community
  • 22
    Pub/Sub
  • 19
    "NoSQL" key-value data store
  • 16
    Hashes
  • 13
    Sets
  • 11
    Sorted Sets
  • 10
    NoSQL
  • 10
    Lists
  • 9
    Async replication
  • 9
    BSD licensed
  • 8
    Bitmaps
  • 8
    Integrates super easy with Sidekiq for Rails background
  • 7
    Keys with a limited time-to-live
  • 7
    Open Source
  • 6
    Lua scripting
  • 6
    Strings
  • 5
    Awesomeness for Free
  • 5
    Hyperloglogs
  • 4
    Transactions
  • 4
    Outstanding performance
  • 4
    Runs server side LUA
  • 4
    LRU eviction of keys
  • 4
    Feature Rich
  • 4
    Written in ANSI C
  • 4
    Networked
  • 3
    Data structure server
  • 3
    Performance & ease of use
  • 2
    Dont save data if no subscribers are found
  • 2
    Automatic failover
  • 2
    Easy to use
  • 2
    Temporarily kept on disk
  • 2
    Scalable
  • 2
    Existing Laravel Integration
  • 2
    Channels concept
  • 2
    Object [key/value] size each 500 MB
  • 2
    Simple

Sign up to add or upvote prosMake informed product decisions

Cons of NSQ
Cons of Redis
  • 1
    Long term persistence
  • 1
    Get NSQ behavior out of Kafka but not inverse
  • 1
    HA
  • 15
    Cannot query objects directly
  • 3
    No secondary indexes for non-numeric data types
  • 1
    No WAL

Sign up to add or upvote consMake informed product decisions

What is NSQ?

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.

What is Redis?

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention NSQ and Redis as a desired skillset
LaunchDarkly
Oakland, California, United States
What companies use NSQ?
What companies use Redis?
See which teams inside your own company are using NSQ or Redis.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with NSQ?
What tools integrate with Redis?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4639
Jun 6 2019 at 5:11PM

AppSignal

RedisRubyKafka+9
15
1639
GitHubDockerReact+17
40
36259
What are some alternatives to NSQ and Redis?
RabbitMQ
RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
Kafka
Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
NATS
Unlike traditional enterprise messaging systems, NATS has an always-on dial tone that does whatever it takes to remain available. This forms a great base for building modern, reliable, and scalable cloud and distributed systems.
gRPC
gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking...
MQTT
It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
See all alternatives