question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What socket data exists within redis?

See original GitHub issue

I am currently storing data using socket.data.myCustomData and am able to retrieve the data properly between servers. However, I’m wondering if this data is stored in redis itself?

By that I mean,

  • Server 1 -> mySocket.data
  • Server 2
  • Server 3

If I kill Server 1, will Server 2 and Server 3 be able to access mySocket.data regardless of Server 1 and it’s memory/process?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
y4my4my4mcommented, Apr 13, 2022

That clears things up. Thank you!

1reaction
darrachequesnecommented, Apr 13, 2022

but that requires getting the in-memory data from each server

Yes, that’s right 👍

In your example above, if server1 gets killed, the data is lost. Sorry for the confusion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Socket.IO checking if room contains clients with socket.io-redis
What is "efficient way" to check if some room has connected clients or even exists? socket.on('pm', function(data) { data.from ...
Read more >
Using Redis With Node.js And Socket.IO - ScaleGrid
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. It supports data ......
Read more >
Redis client handling
A readable file event is created so that Redis is able to collect the client queries as soon as new data is available...
Read more >
RESP protocol spec - Redis
While RESP is technically non-TCP specific, the protocol is only used with TCP connections (or equivalent stream-oriented connections like Unix sockets) in ...
Read more >
Client-side caching in Redis
The Redis implementation of client-side caching · Clients can enable tracking if they want. · When tracking is enabled, the server remembers what...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found