0% completed
Caching
Load balancing helps you scale horizontally across an ever-increasing number of servers, but caching will enable you to make vastly better use of the resources you already have as well as making otherwise unattainable product requirements feasible. Caches take advantage of the locality of reference principle: recently requested data is likely to be requested again. They are used in almost every computing layer: hardware, operating systems, web browsers, web applications, and more.
.....
.....
.....
rahul.raja412
· 2 years ago
Use read aside caching when optimizing read performance is the primary concern and use read-through caching when ensuring data consistency between the cache and backend storage is critical.
Choose write-through caching when data consistency is critical, write-back caching when write performance is paramount and some data loss or inconsistency can be tolerated, and write-around caching when write operations are infrequent or when certain data should not be cached.
Sam Levin
· a year ago
This explanation seems a little bizarre to me.
"You should use cache-aside when you need caching but also need to ensure that a failure of the cache won’t take down your whole system"
What's an example of a situation where I'm ok with a cache failure taking down my whole system?
I also feel like you're glossing over how much complexity is involved in implementing a read-through cache. Hard to imagine how this layer wouldn't need to be aware of a lot of application logic.
Idhant Haldankar
· a year ago
I wanted to confirm my understanding.
So in this type of cache update - Write-around cache - dont we also delete/purge the the record in cache layer? I wonder how will the client expect "cache miss" by simply updating the DB records.
Willian Garbo Godoy Batista (Willggb)
· 3 months ago
I think that write strategies should be separeted from topic "Cache Invalidation". The relations between the contents seems a little disconnected.
F
· 4 years ago
If the system we are building is not large enough to have its own CDN, we can ease a future transition by serving the static media off a separate subdomain (e.g., static.yourservice.com) using a lightweight HTTP server like Nginx, and cut-over the DNS from your servers to a CDN later.
So how does this help exactly? Isn't this just sending requests to a back-end server? Is that idea that having all of your static media on a dedicated back-end somehow faster than having both your static stuff and other stuff on the same back-end?
Nikita Karpukhin
· 4 years ago
Write-around cache: This technique is similar to write-through cache, but data is written directly to permanent storage, bypassing the cache
So how does this solve cache invalidation problem?
Chris Drane
· 4 years ago
Under this scheme, data is written into the cache and the corresponding database simultaneously.
How is this done in practice? I know that DDID references XA being one approach. Are there others?