Using Memcached to manage multiple nodes

Memcached is an in-memory key-value store designed to handle small chunks of arbitrary data. Typically, Memcached is used for caching the server and API responses in the memory so that we can render the cached data, instead of hitting the database and waiting for a response if the data has already been persisted in the cache.

Similar to Redis, Memcached is run in a separate server instance out of the web server. This means that we can use it in the same way that we used Redis to propagate events across multiple server nodes.

There are a couple of projects on GitHub with the intention of providing the ability to use Memcached with Socket.IO, but at the time of writing there was none that had been updated after ...

Get Socket.IO Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.