October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Redis Presence and Matchmaking Queues vs. In-Memory Queues for Multiplayer Games

In-memory queues suit single-process transient state; Redis suits shared matchmaking and cross-node updates. Learn when to use sorted sets, Pub/Sub, or Streams.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use an in-memory queue when one process owns transient matchmaking state and only that process needs it. Use Redis when multiple game-server or application instances must share queue data or publish updates to one another. Choose the Redis data structure by the job: sorted sets and hashes can represent matchmaking state, Pub/Sub can broadcast ephemeral notifications, and Streams can retain events for later processing. Redis Pub/Sub is not a durable queue, and Redis is not automatically the right place for authoritative real-time simulation state.

First separate queue state, presence, and event processing

These three concerns are related, but they are not interchangeable:

As an Amazon Associate I earn from qualifying purchases.

  • Matchmaking state answers who is waiting, which mode or skill range they qualify for, and who can be claimed for a match.
  • Presence state answers whether a player or server is considered online. A notification that presence changed is not itself a reliable presence record.
  • Event processing handles work that may need to survive a consumer disconnect or failure, such as processing a retained event later.

An in-process event bus or queue belongs to the process that created it. Other workers or pods have separate local state; they do not automatically see that process’s queue or presence notifications. Redis provides shared data structures and cross-node messaging, but the chosen Redis feature determines whether a message is merely broadcast or retained for recovery.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What each approach is suited to

Decision In-memory queue Redis-backed design
State scope Local to its owning process; separate workers do not automatically share it. Shared Redis data can be accessed by multiple application instances.
Network path May remain inside the game service process; actual latency depends on implementation and workload. Adds a Redis service hop. Redis documentation describes sub-millisecond Redis messaging, but that is not an end-to-end game matchmaking or gameplay latency guarantee.
Ordering and filtering The application must implement ordering, filtering, and concurrent claims. Sorted sets can order players by join time; separate keys can partition by mode and skill bucket.
Cross-instance notifications Do not cross process boundaries automatically. Pub/Sub fans out to subscribers connected at publish time; disconnected subscribers miss messages.
Retention and recovery Depend on the particular implementation and owner process; no specific in-memory implementation is assumed here. Pub/Sub is nonpersistent and at-most-once. Streams support retained events, consumer groups, acknowledgments, replay, and recovery of pending work.
Operational footprint Fewer distributed components for a single-process deployment. Process loss or restart also loses its local transient state. Adds Redis as a shared dependency and requires operational planning for that service.

Neither option has a universally established end-to-end performance advantage. Measure the real deployment’s latency, memory use, failure recovery, and concurrent join behavior instead of treating a Redis messaging figure as a game-specific benchmark.

#1 Best Overall
Sale
Multiplayer Gaming and Engine Coding for the Torque Game Engine
  • New
  • Mint Condition
  • Dispatch same day for order received before 12 noon
  • Guaranteed packaging
  • No quibbles returns

Model matchmaking state in Redis

Redis’s March 25, 2026 matchmaking tutorial presents a practical starting model: a sorted set for waiting player IDs, hashes for player metadata, and room records with a time-to-live. One queue key can represent a particular mode and skill bucket, for example matchmaking:queue:{mode}:{skillBucket}; a player hash can use matchmaking:player:{playerId}; and a room record can use matchmaking:room:{roomId}.

  • Sorted set: store player IDs and use join time as the score so the application can select the oldest eligible players.
  • Player hash: keep waiting-player metadata separately from the ordered membership, rather than treating a notification as the only record of a player’s state.
  • Room record: store room state separately and give it a TTL so an abandoned record can expire. The tutorial’s sample TTL is 30 minutes; that is an example, not a general recommendation for every game.
  • Partition keys: separate queues by mode and skill bucket when those are matching criteria. The tutorial uses a configurable sample bucket size of 25, not a universal matchmaking rule.

This data model is a matchmaking pattern, not a recommendation to put authoritative per-frame simulation state in Redis. The right boundary depends on the game’s topology and workload.

Make concurrent match formation safe

A read-then-write race occurs if two requests inspect the same waiting players and both attempt to form a room from them. Redis’s March 25, 2026 tutorial uses optimistic concurrency with WATCH and MULTI/EXEC: if another request changes the watched queue key before the transaction executes, the transaction aborts and the application retries against fresh data.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Write or update the joining player’s metadata in the player hash.
  2. Watch the relevant mode-and-skill queue key.
  3. Read the queue size and determine whether enough eligible players are waiting.
  4. Start a transaction to add the player, read the oldest required members, and remove the matched range.
  5. If the watched key changed and the transaction aborts, retry the decision using current queue contents rather than assuming the original match succeeded.

The important property is not simply “Redis is shared,” but that the match claim is protected against competing requests. The tutorial’s retry approach is an optimistic-concurrency pattern; applications still need to define retry limits, cancellation behavior, and what to do when a player disconnects or a request is repeated.

Use Pub/Sub for recoverable presence and room signals

Redis Pub/Sub is useful when a publisher needs to fan out a live signal to currently connected subscribers, such as a presence change or a room lifecycle update across server nodes. Redis forwards messages to active channel subscribers in publish order. Delivery is at-most-once: an offline subscriber misses a published message, and Pub/Sub does not retain a backlog for it.

Consequently, make the underlying presence or room state independently readable. Treat a Pub/Sub message as a prompt to refresh or reconcile that state, not as the sole evidence that a player is online or a room exists. If a node disconnects briefly, it can recover by querying current state rather than expecting Redis to replay missed Pub/Sub notifications. The matchmaking tutorial likewise separates room state from fire-and-forget room events.

Rank #4
Vilros Basic Starter Kit for Raspberry Pi 5 with Dual Passive and Active Cooling Case-Includes Pi 5 Board, Case, Power Supply, 32GB Preloaded SD Card, HDMI Adapter & More (1GB, Black)
  • A RASPBERRY PI 5 KIT FROM AN APPROVED RESELLER: This Vilros Complete Starter Kit for Pi 5 Includes Raspberry Pi 5 Board with all the accessories you need to get started.
  • 11 PART KIT INCLUDES MOST ACCESSORIES NEEDED YOU TO GET UP AND RUNNING : 1.Raspberry Pi 5 Board–2.Metal/Aluminum Alloy Passive & Active Cooling Case–3.Raspberry Pi 5 Compatible Power Supply–4. PWM fan With 10k Max RPM Capacity (pre installed in the case)--5. 128GB Micro SD Card With 64bit Raspberry Pi OS Preinstalled–6. Micro SD to USB Adapter to rewrite SD card if Desired–7. Standard HDMI to Micro HDMI Adapter Cable--8.Neoprene Storage bag–9.Vilros Quickstart Guide for Raspberry Pi–10. Mini To Standard Camera Module Adapter Cable to use a camera module with a PI 5--11.LIR2032 Battery Connector For Raspberry Pi 5 RTC Port (connector ONLY Battery NOT Included)
  • RASPBERRY PI 5 SPECS AND FEATURES:--Processor: Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU, with cryptography extensions, 512KB per-core L2 caches, and a 2MB shared L3 cache----Features: 2.4GHz quad-core, 64-bit Arm Cortex-A76 CPU–VideoCore VII GPU supporting Vulkan 1.2 and OpenGL ES–LPDDR4X-4267 SDRAM (4GB and 8GB options)--PCIe 2.0 x1 interface for fast peripherals ( Requires adapter)--Dual-band 802.11ac Wi-Fi 2.4 GHz and 5.0 GHz –Bluetooth 5.0 / Bluetooth Low Energy (BLE)
  • MULTIFUNCTION PASSIVE & ACTIVE COOLED CASE : Case feautes a built in pole/column that contacts the main chip on the raspberry pi 5 board via an included thermal pad too passively cool the board and also includes a preinstalled PWM Fan that plugs directly into the fan port on the board. The fan will only turn on if needed and will also increase RPMs as needed. Other features include a built in power button that shows the on board light status, camera module compatiblilty, can be used in single layer configuration for hat compatibilty
  • HIGH QUALITY COMPONENTS: All components are manufactured with Raspberry Pi in mind and are backed by the Vilros 1 Year wartranty.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use Streams when consumers must recover missed work

Redis Streams are the better fit when consumers need retained ordered events and the ability to resume processing. Redis documents commands including XADD, XREADGROUP, and XACK, along with claiming commands for work left pending by a failed consumer. Consumer groups allow independent groups to process a stream, and entries can be replayed subject to retention and stream management.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is materially different from Pub/Sub: a disconnected Pub/Sub subscriber loses the message, while a Stream consumer can later read retained entries and acknowledge completed work. It is also useful to distinguish an event stream from a job queue: stream events are retained for consumer processing, while a job-queue pattern generally assigns a task to one worker and removes it after completion. Select retention, acknowledgment, and retry behavior around the application’s actual recovery requirements.

Choose by deployment and failure needs

An in-memory queue is a reasonable fit when

  • One process owns the matchmaking state and handles the requests that need it.
  • The queue is transient and its loss on process restart is acceptable to the game’s design.
  • You want to avoid adding a shared service for state that does not need to cross process boundaries.

Redis is a stronger fit when

  • Multiple game-server or application instances must see common matchmaking or presence-related state.
  • Matchmaking needs ordered selection and guarded concurrent claims across requests.
  • Active subscribers on different nodes need ephemeral notifications, with state available for reconciliation if a signal is missed.
  • Consumers must process retained events after disconnects or failures, in which case Streams are more appropriate than Pub/Sub.

For either design, test the operational cases that define correctness: simultaneous joins contending for the same players, duplicate or retried requests, disconnects during matching, process restarts, Redis or network interruptions where applicable, and stale room or presence state. Measure latency and memory under the expected workload; the cited Redis materials do not establish a comparative benchmark against a particular in-memory queue.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.