Skip to Content
Building Scalable Apps with Redis and Node.js
book

Building Scalable Apps with Redis and Node.js

by Joshua Johanan
September 2014
Intermediate to advanced
316 pages
7h 6m
English
Packt Publishing
Content preview from Building Scalable Apps with Redis and Node.js

Redis persistence

Our example application has one big caveat. Every key that is added will not be removed. If we released something like this to the public, eventually Redis will fill up all the memory allotted to it. We can test this by connecting to Redis with redis-cli and running KEYS *. We will see that all of our users and messages are still in Redis. This will be true if we shut down the Redis server and bring it back up. Go ahead and restart Redis and then run KEYS * again. We still see the keys are there. Even though Redis is an in-memory key-value store, it persists data to the disk. We can see this happen. Redis will log in to the console when it saves to the disk. This will look like the following screenshot:

Then, when you launch Redis, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reactive Programming with Node.js

Reactive Programming with Node.js

Fernando Doglio
Node: Up and Running

Node: Up and Running

Tom Hughes-Croucher, Mike Wilson
Learn TypeScript 3 by Building Web Applications

Learn TypeScript 3 by Building Web Applications

Sebastien Dubois, Alexis Georges

Publisher Resources

ISBN: 9781783984480Supplemental Content