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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To run Socket.IO across multiple server processes, you need two separate pieces: session affinity so HTTP long-polling requests return to the process that owns the session, and a compatible adapter so broadcasts can reach clients connected to other processes. Redis Pub/Sub can provide the second piece; it does not provide the first, store application data, or guarantee that every event arrives.

Why a single-process Socket.IO setup stops working when you add nodes

Each Socket.IO process knows about its own connected clients and local adapter state. If a client on node A triggers a broadcast, node A can deliver it locally, but without inter-server communication it cannot reach matching clients connected to node B.

An adapter provides that communication path. With the Redis adapter, a server publishes broadcast packets to Redis Pub/Sub, and the other Socket.IO servers receive those packets and deliver them to their own matching local clients. The adapter page says it stores no Redis keys, so this is packet forwarding—not persistence for application state or event history. Socket.IO Redis adapter documentation

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

What a multi-node deployment needs

1. Affinity for HTTP long-polling

Long-polling uses multiple HTTP requests for a Socket.IO session. Those requests must reach the process that created the session. Configure the load balancer or proxy for session affinity when long-polling is enabled. The Redis adapter does not make session state interchangeable between processes: Socket.IO’s current adapter documentation warns that a request routed to a server unaware of the session can receive an HTTP 400 response. Socket.IO Redis adapter documentation

#1 Best Overall
NETGEAR 5-Port Gigabit Ethernet Unmanaged Network Switch (GS305)
  • GIGABIT ETHERNET PORTS: Features 5 x 1.0Gbps Ethernet ports for high-speed connectivity. Auto-negotiating ports detect the optimal speed for connected devices and work with existing Cat5e or Cat6 Ethernet cables.
  • PLUG-AND-PLAY UNMANAGED NETWORK SWITCH: Simple plug-and-play setup with no software to install or configuration required.
  • FLEXIBLE MOUNTING OPTIONS: Compact metal design supports desktop or wall-mount placement for versatile installation.
  • SILENT & ENERGY-EFFICIENT OPERATION: Fanless design ensures silent performance, while IEEE 802.3az Energy Efficient Ethernet reduces power consumption without compromising high-speed network performance.
  • REGIONAL COMPATIBILITY: Made for use in U.S. & CA only

Socket.IO’s multi-node guide gives the same routing requirement for long-polling. Socket.IO multi-node guide

2. An adapter for cross-node broadcasts

Affinity keeps a client’s requests with its owning process; it does not distribute broadcasts. Configure an adapter supported by your Socket.IO and Redis client versions if broadcasts must reach clients on other nodes. These solve different problems, so enabling one does not replace the other.

Rank #2
Sale
TP-Link TL-SG105, 5 Port Gigabit Unmanaged Ethernet Switch, Network Hub, Ethernet Splitter, Plug & Play, Fanless Metal Design, Shielded Ports, Traffic Optimization
  • 𝗢𝗻𝗲 𝗦𝘄𝗶𝘁𝗰𝗵 𝗠𝗮𝗱𝗲 𝘁𝗼 𝗘𝘅𝗽𝗮𝗻𝗱 𝗡𝗲𝘁𝘄𝗼𝗿𝗸: 5× 10/100/1000Mbps RJ45 Ports supporting Auto Negotiation and Auto MDI/MDIX.
  • 𝗚𝗶𝗴𝗮𝗯𝗶𝘁 𝘁𝗵𝗮𝘁 𝗦𝗮𝘃𝗲𝘀 𝗘𝗻𝗲𝗿𝗴𝘆: Latest innovative energy-efficient technology greatly expands your network capacity with much less power consumption and helps save money.
  • 𝗥𝗲𝗹𝗶𝗮𝗯𝗹𝗲 𝗮𝗻𝗱 𝗤𝘂𝗶𝗲𝘁: IEEE 802.3X flow control provides reliable data transfer and Fanless design ensures quiet operation.
  • 𝗣𝗹𝘂𝗴 𝗮𝗻𝗱 𝗣𝗹𝗮𝘆: Easy setup with no software installation or configuration needed.
  • 𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗦𝗼𝗳𝘁𝘄𝗮𝗿𝗲 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀: Prioritize your traffic and guarantee high quality of video or voice data transmission with Port-based 802.1p/DSCP QoS and IGMP Snooping.

3. A deliberate transport configuration

Socket.IO can use WebTransport, WebSocket, or HTTP long-polling; Engine.IO manages the transports and upgrade mechanism. Check the transports enabled by your server and clients rather than assuming every deployment has the same routing needs. In particular, do not infer that long-polling is absent simply because WebSocket is available. How Socket.IO works

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

What the Redis adapter does—and what happens if Redis fails

The Redis adapter uses Pub/Sub to relay broadcast packets among Socket.IO servers. Its documentation says it stores no Redis keys. If Redis connectivity is lost, packets are delivered only to clients connected to the current server; cross-node propagation stops. Treat Redis availability as part of the broadcast path and decide how your application should behave during an outage. Socket.IO Redis adapter documentation

Rank #3
Sale
NETGEAR 8-Port Gigabit Ethernet Unmanaged Network Switch (GS308)
  • GIGABIT ETHERNET PORTS: Features 8 x 1.0Gbps Ethernet ports for high-speed connectivity. Auto-negotiating ports detect the optimal speed for connected devices and work with existing Cat5e or Cat6 Ethernet cables.
  • PLUG-AND-PLAY UNMANAGED NETWORK SWITCH: Simple plug-and-play setup with no software to install or configuration required.
  • FLEXIBLE MOUNTING OPTIONS: Compact metal design supports desktop or wall-mount placement for versatile installation.
  • SILENT & ENERGY-EFFICIENT OPERATION: Fanless design ensures silent performance, while IEEE 802.3az Energy Efficient Ethernet reduces power consumption without compromising high-speed network performance.
  • REGIONAL COMPATIBILITY: Made for use in U.S. & CA only

Socket.IO guarantees event ordering across its low-level transports, including during an upgrade from long-polling to WebSocket. Its default delivery guarantee is at most once. Correct ordering does not mean an event is persisted, retried, or guaranteed to arrive. If an application needs durable delivery or replay after disconnection, design that separately rather than treating the adapter as a message store. Socket.IO delivery guarantees

Choose an adapter against compatibility and recovery needs

For new development with Redis 7.0 sharded Pub/Sub, Socket.IO recommends the sharded adapter. The documented minimums are Redis 7.0 with redis@4.6.0 for the node-redis example, or Redis 7.0 with ioredis@5.9.0 for the ioredis example. The compatibility information lists Redis adapter 7.x and later with Socket.IO 4.3.1 and later. Verify the current compatibility table against the exact versions you deploy before rollout. Socket.IO Redis adapter documentation

Rank #4
TP-Link LS1005G, Litewave 5 Port Gigabit Ethernet Unmanaged Switch
  • 【One Switch Made to Expand Network】Features 5 RJ45 ports with 10/100/1000Mbps speeds, supporting Auto-Negotiation and Auto MDI/MDIX for hassle-free setup. Ideal for expanding your network, with 1 uplink (input) port and 4 output ports to split your Ethernet connection to multiple devices.
  • 【Gigabit that Saves Energy】Latest innovative energy-efficient technology greatly expands your network capacity with much less power consumption and helps save money
  • 【Reliable and Quiet】IEEE 802.3X flow control provides reliable data transfer and Fanless design ensures quiet operation
  • 【Plug and Play】Easy setup with no software installation or configuration needed
  • 【Ethernet Splitter】Connect to your router or modem for additional wired connections (laptop, gaming console, printer, etc)

The same documentation says the Redis adapter does not support connection-state recovery. If clients must recover state after a temporary disconnection, confirm that the adapter you select supports the recovery behavior you need; do not assume the Redis adapter supplies it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Secure Redis as trusted internal infrastructure

The Redis adapter assumes Redis is trusted infrastructure. Its Pub/Sub messages are not signed, encrypted, or authenticated by the adapter. A party able to publish to adapter channels could inject packets or forged control messages; a party able to observe relevant traffic could inspect payloads. Keep Redis off untrusted networks and apply network isolation, access controls, authentication, TLS, firewall rules, and least-privilege credentials. Socket.IO Redis adapter documentation

Best Value
Sale
TP-Link TL-SG108S-M2, 8-Port Multi-Gigabit 2.5G Unmanaged Ethernet Switch
  • 𝗘𝗶𝗴𝗵𝘁 𝟮.𝟱 𝗚𝗯𝗽𝘀 𝗣𝗼𝗿𝘁𝘀 𝗳𝗼𝗿 𝗦𝘂𝗽𝗲𝗿-𝗙𝗮𝘀𝘁 𝗖𝗼𝗻𝗻𝗲𝗰𝘁𝗶𝗼𝗻𝘀: 8× 2.5-Gigabit ports unlock the highest performance of your Multi-Gig bandwidth and devices, and provide up to 40 Gbps of switching capacity.
  • 𝗔𝘂𝘁𝗼-𝗡𝗲𝗴𝗼𝘁𝗶𝗮𝘁𝗶𝗼𝗻: Auto-negotiation intelligently senses the link speeds and adjusts between 3-speeds (100Mb/1G/2.5G) for compatibility and optimal performance for all your devices, including 2.5G WiFi 6 AP, 2.5G NAS, 2.5G PCIe Adapter, 2.5G Server, gaming computer, 4K video, and more.
  • 𝗜𝗱𝗲𝗮𝗹 𝗳𝗼𝗿 𝗩𝗮𝗿𝗶𝗼𝘂𝘀 𝗦𝗰𝗲𝗻𝗮𝗿𝗶𝗼𝘀: Built for LAN parties, home entertainment, small and home offices, and instant transfer for workstations.
  • 𝗛𝗮𝘀𝘀𝗹𝗲-𝗙𝗿𝗲𝗲 𝗖𝗮𝗯𝗹𝗶𝗻𝗴: Instantly upgrade to 2.5 Gbps without the need to upgrade to Cat6 wiring, reducing wiring costs and hassle. *
  • 𝗦𝗶𝗹𝗲𝗻𝘁 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻: Industry-leading fanless design ensures silent operation, ideal for any home or business.

Plan capacity without assuming a universal per-process limit

Socket.IO identifies connected-client count and messages received and sent per second as major drivers of resource use, and says memory should scale linearly with connected clients. Its published measurements depend on the underlying WebSocket server implementation. The illustrated test context was Ubuntu 22.04 LTS, Node.js v20.3.0, socket.io@4.7.2, eiows@6.7.2, uWebSockets.js@20.33.0, and ws@8.11.0; those results are not a universal capacity promise for a different stack. Socket.IO memory usage

For a design review or incident diagnosis, check these dimensions independently:

  • Transport and routing: Which transports are enabled, and does long-polling traffic have affinity?
  • Broadcast path: Does the configured adapter relay events to every node that has relevant clients?
  • Compatibility: Do the Socket.IO, adapter, Redis, and Redis client versions meet the documented requirements?
  • Failure behavior: What should users see when Redis is unreachable and cross-node broadcasts stop?
  • Delivery and recovery: Does the application need persistence, retries, replay, or connection-state recovery beyond at-most-once delivery?
  • Security and operations: Is Redis isolated and access-controlled, and can the team monitor and maintain the added dependency?

The official materials cited here do not establish a universal client limit or a quantitative cost or latency comparison across adapters. Benchmark the intended deployment and workload rather than extrapolating a maximum from an implementation-specific memory chart.

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

Quick Recap

Bestseller No. 1
NETGEAR 5-Port Gigabit Ethernet Unmanaged Network Switch (GS305)
NETGEAR 5-Port Gigabit Ethernet Unmanaged Network Switch (GS305)
REGIONAL COMPATIBILITY: Made for use in U.S. & CA only
$15.99
SaleBestseller No. 3
NETGEAR 8-Port Gigabit Ethernet Unmanaged Network Switch (GS308)
NETGEAR 8-Port Gigabit Ethernet Unmanaged Network Switch (GS308)
REGIONAL COMPATIBILITY: Made for use in U.S. & CA only
$19.99
Bestseller No. 4
TP-Link LS1005G, Litewave 5 Port Gigabit Ethernet Unmanaged Switch
TP-Link LS1005G, Litewave 5 Port Gigabit Ethernet Unmanaged Switch
【Plug and Play】Easy setup with no software installation or configuration needed
$9.99

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.