StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Application & Data
  3. In-Memory Databases
  4. In Memory Databases
  5. NSQ vs Redis

NSQ vs Redis

OverviewDecisionsComparisonAlternatives

Overview

Redis
Redis
Stacks61.9K
Followers46.5K
Votes3.9K
GitHub Stars42
Forks6
NSQ
NSQ
Stacks142
Followers356
Votes148

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.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Redis, NSQ

Pramod
Pramod

Co Founder at Usability Designs

Mar 2, 2020

Needs advice

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.

572k views572k
Comments

Detailed Comparison

Redis
Redis
NSQ
NSQ

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.

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.

-
support distributed topologies with no SPOF;horizontally scalable (no brokers, seamlessly add more nodes to the cluster);low-latency push based message delivery (performance);combination load-balanced and multicast style message routing;excel at both streaming (high-throughput) and job oriented (low-throughput) workloads;primarily in-memory (beyond a high-water mark messages are transparently kept on disk);runtime discovery service for consumers to find producers (nsqlookupd);transport layer security (TLS);data format agnostic;few dependencies (easy to deploy) and a sane, bounded, default configuration;simple TCP protocol supporting client libraries in any language;HTTP interface for stats, admin actions, and producers (no client library needed to publish);integrates with statsd for realtime instrumentation;robust cluster administration interface (nsqadmin)
Statistics
GitHub Stars
42
GitHub Stars
-
GitHub Forks
6
GitHub Forks
-
Stacks
61.9K
Stacks
142
Followers
46.5K
Followers
356
Votes
3.9K
Votes
148
Pros & Cons
Pros
  • 888
    Performance
  • 542
    Super fast
  • 514
    Ease of use
  • 444
    In-memory cache
  • 324
    Advanced key-value cache
Cons
  • 15
    Cannot query objects directly
  • 3
    No secondary indexes for non-numeric data types
  • 1
    No WAL
Pros
  • 29
    It's in golang
  • 20
    Lightweight
  • 20
    Distributed
  • 18
    Easy setup
  • 17
    High throughput
Cons
  • 1
    HA
  • 1
    Long term persistence
  • 1
    Get NSQ behavior out of Kafka but not inverse

What are some alternatives to Redis, NSQ?

Kafka

Kafka

Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.

RabbitMQ

RabbitMQ

RabbitMQ gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.

Celery

Celery

Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.

Amazon SQS

Amazon SQS

Transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be always available. With SQS, you can offload the administrative burden of operating and scaling a highly available messaging cluster, while paying a low price for only what you use.

ActiveMQ

ActiveMQ

Apache ActiveMQ is fast, supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License.

ZeroMQ

ZeroMQ

The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more.

Apache NiFi

Apache NiFi

An easy to use, powerful, and reliable system to process and distribute data. It supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Hazelcast

Hazelcast

With its various distributed data structures, distributed caching capabilities, elastic nature, memcache support, integration with Spring and Hibernate and more importantly with so many happy users, Hazelcast is feature-rich, enterprise-ready and developer-friendly in-memory data grid solution.

Aerospike

Aerospike

Aerospike is an open-source, modern database built from the ground up to push the limits of flash storage, processors and networks. It was designed to operate with predictable low latency at high throughput with uncompromising reliability – both high availability and ACID guarantees.

Gearman

Gearman

Gearman allows you to do work in parallel, to load balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase