At the Chan Zuckerberg Initiative (CZI), we use RedisMemo to improve the performance and reliability of our products, Summit Learning and Along. Redis

RedisMemo: Caching is made easy

submited by
Style Pass
2021-06-07 17:00:04

At the Chan Zuckerberg Initiative (CZI), we use RedisMemo to improve the performance and reliability of our products, Summit Learning and Along.

RedisMemo is an application-level caching system for Ruby programs. It can be used to cache database queries (with built-in support for ActiveRecord), third-party API calls, pure functions, or any combination thereof.

With RedisMemo, to cache all the select-by-id queries on the users table, only two lines of code are needed in the User model (details in section 3.2).

A caching layer functions like a “content delivery network” (CDN) for delivering database queries. Applications often use a CDN to multiply their web servers’ effective capacity. Similarly, caching increases an individual database’s capacity by protecting it from repetitive queries. A Rails application typically has a single SQL database that is queried by many application processes (Figure 1).

When application usage increases, the number of requests grows, and so does the number of database queries. There is a hard limit on the size of a single relational database. The largest database instances offered by AWS come with 64 cores. A Redis cluster, however, can scale to 1000 nodes.

Leave a Comment