Skip to main content

Posts

Showing posts with the label caching

Caching Strategies and How to Choose the Right One

👉 Read First: A Brief Overview of Caching Caching is one of the easiest ways to increase system performance. Databases can be slow (yes even the NoSQL ones) and as you already know, speed is the name of the game. If done right , caches can reduce response times, decrease load on database, and save costs. There are several strategies and choosing the right one can make a big difference. Your caching strategy depends on the data and data access patterns . In other words, how the data is written and read. For example: is the system write heavy and reads less frequently? (e.g. time based logs) is data written once and read multiple times? (e.g. User Profile) is data returned always unique? (e.g. search queries) A caching strategy for Top-10 leaderboard system for mobile games will be very different than a service which aggregates and returns user profiles. Choosing the right caching strategy is the key to improving performance. Let’s take a quick look at various caching strat...

4 Microservices Caching Patterns at Wix

4 Microservices Caching Patterns at Wix Wix has a huge scale of traffic. more than 500 billion HTTP requests and more than 1.5 billion Kafka business events per day. Caching the responses and events is critical for having the best performance and resilience for Wix’s 1500 microservices. Photo by Jelle de Gier on Unsplash As traffic to your service grows, customers can face much longer loading and response times, and not return to your service. Network costs can increase and the unexpected load on your DBs can potentially cause them to fail. One of the ways you can mitigate these issues is to introduce a cache. A cache will reduce latency, by avoiding performing a costly query to a DB, or HTTP request to a Wix service or a 3rd party service. It will also reduce the needed scale to service these costly requests. It will also improve reliability, by making sure some data can be returned even if aforementioned DB or 3rd party service are currently unavailable. Below are 4 Caching patte...