Many sites today have multiple servers that run them. In this video, learn about using Redis for multiple server Socket.IO.
- [Instructor] Welcome to Using Redis…for Multi-Server Socket.io.…In a previous video, we learned…how to use namespaces alongside Express routes.…In this video, we're gonna take a look…at using multiple servers…to send Socket.io messages to clients,…and we will do this by using Redis.…Now many sites today have multiple servers…that serve the site.…This can cause problems, as certain things like sessions,…can be stored on just one server.…
When a request comes in into another server,…then the session is not there.…Now this is similar when using Socket.io.…Socket.io will know about all the clients…that have connected…to a specific server but not to any others.…So let's go ahead and look at code to write this…so that Socket.io can actually see all the connections…across all servers.…First, let's start with package.json.…Here, we see again we have Express and Socket.io…but now, we have this socket.io-redis.…
This package is actually gonna do a lot of the work for us,…but let's actually see how we implement it.…So let's go to index.js.…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Using Redis
- Structures, channels, and subscribing
- Adding messaging
- Integrating Redis and Node.js
- Working with geospacial indexes
- Using Node.js with Socket.IO
- Working with rooms
- Creating namespaces
- Using Socket.IO and Express
- Sharing states
- Using routes
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
RESTful Web API Design with Node.jswith Saleh Hamadeh2h 35m Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
1. Using Redis
2. Redis Messaging
3. Integrating Redis and Node.js
4. Using Node.js and Socket.IO
5. Using Rooms and Namespaces in Socket.IO
6. Using Socket.IO and Express
Out of process messaging8m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.