Improving Microservices Performance with Caching
Because microservices run asynchronously, their execution time and performance are of minor importance in most scenarios. For example, when a Django web app offloads the task of sending a confirmation email to the user, it doesn’t matter whether the email arrives in 5 or 15 seconds. Nevertheless, we developers want to utilize resources optimally, and in extreme cases, we can end up with microservices taking half an hour or longer to run.
To address this, this chapter teaches you how to maintain and improve microservices performance with caching. First, you’ll learn about the fundamentals and benefits of caching. Then, you’ll learn about applying Django’s cache framework. Finally, you’ll master Redis for caching.
By the end of this chapter, you will know how to apply caching in Django microservices applications to maintain or improve performance.
To achieve this, this chapter covers the following...