O'Reilly logo

Implementing Cloud Design Patterns for AWS by Marcus Young

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

In-memory cache pattern

While it is important to create a database in which the data is highly available, there are other optimizations possible, depending on the structure. If an application is very read-heavy but does not write very often, it might make sense to use a read-only database with splitting, as designed in the previous pattern. It might also serve the user or consuming system to cache the data so that it does not have to be retrieved on every request.

Consider an application that uses pagination to display information to a user. A typical query might look like SELECT * FROM products WHERE category=23 LIMIT 50 OFFSET 1000;. At first glance, this might be acceptable, but for this particular query, the application will execute and retrieve ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required