CHAPTER 12

image

Redis and Authentication Patterns

This chapter deals with two Express.js topics: Redis and authentication patterns. Redis is a fast database that is often used for storing Express.js sessions.

Redis

Redis (http://redis.io) is often used in Express.js applications for session persistence, because storing sessions in a physical storage keeps apps from losing users’ data when a system is restarted or redeployed. It also enables the use of multiple RESTful servers because they can connect to the same Redis server. In addition, Redis can be used for queues and scheduling tasks (e.g., e-mail jobs).

Redis itself is a stand-alone service. ...

Get Pro Express.js 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.