Redis, Session Storage, REST and BTrees

Sessions are not a must for every web app. In fact, you can replace state maintenance (Sessions) with State ‘Transfers’ (REST).  RESTFul calls provide the entire client state for each call. This is actually a good thing – as far as the server is concerned. No longer does the server need to store millions and millions of session objects. This improves scalability on the server app.

REDIS – An alternative to session storage in the database

Redis is an open source key-value cache and storage system, also referred to as a data structure server due to its advanced support for several data types, such as hashes, lists, sets, and bitmaps, amongst others. It also supports clustering, making it useful in highly-available and scalable environments.


A B-tree is a tree data structure that keeps data sorted and allows searches, insertions, and deletions in logarithmic time.   It is optimized for systems that read and write large blocks of data ( databases and file systems).

See this post on how twitter leveraged Redis to implement a BTRee

Cloud Advisory Services | Security Advisory Services | Data Science Advisory and Research

Specializing in high volume web and cloud application architecture, Anuj Varma’s customer base includes Fortune 100 companies (, British Petroleum, Schlumberger).

All content on this site is original and owned by AdverSite Web Holdings, Inc. – the parent company of No part of it may be reproduced without EXPLICIT consent from the owner of the content.

Anuj Varma – who has written posts on Anuj Varma, Technology Architect.

Leave a Reply

Your email address will not be published. Required fields are marked *