Reviewing cloud and cloud-native patterns
Now that you have more clarity on the service models and their high-level impact, let's explore some patterns in more depth.
The Cache-Aside pattern
With cloud and cloud-native patterns, scaling a component is a scale-out/in story, not a scale-up/down one. This means that we multiply the number of instances, instead of adding more compute to a single instance. Scaling up/down is, of course, still possible, but scaling out/in is by design. Multiplying instances is not a neutral thing because it may disturb every in-process thing. Therefore, it has an impact on how we can handle data caching, user sessions, and so on. When considering a scale-out story, you should try to avoid in-process caching/sessions. Therefore, the Cache-Aside pattern should be implemented with an external cache system, such as Azure Redis Cache or AWS ElastiCache. The goal is to share cached data across instances and to prevent inconsistencies. The following...