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 ...

Get Implementing Cloud Design Patterns for AWS 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.