Different types of Caching Strategies explained:

A cache is a high speed data store which stores a part or the complete dataset so that future requests to the data are served faster.

The data in a cache is stored on a fast access hardware like RAM. Caching allows us to efficiently reuse previously retrieved data.

Caching is leveraged at different layers of technology like:

- Operating Systems
- CDN (Content Delivery Network)
- DNS (Domain Name System)
- Web Applications (APIs)
- Databases etc

Caching information includes:

- database query results
- computationally intensive calculations
- API requests / responses
- data files like HTML, images or
- any application data in general etc

In distributed applications there are various caching strategies:

- write-through
- write-around
- write-back

Let's discuss about each one of them in detail.

1. write-through cache:

In this policy, data is written to both the cache and the underlying data source. The order in which it is written is not important. The main idea is that the I/O operation is considered complete when the data is written to both the cache and the DB.

2. write-around cache:

In this policy, data is directly written to the underlying data source without disturbing the cache.

3. write-back cache:

In this policy, data is written only to the cache and the I/O operation is considered complete.

Typically data is written to the underlying data source as well, but it is done asynchronously using a worker process.

Benefits of caching:

- Improves application performance
- Reduced load on servers
- Reduced load on databases
- Eliminates database hotspots
- Increases Read Throughput (IOPS)
- Reduces bandwidth consumption
If you like this tweet please like & retweet the first tweet to help me reach more people :)

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with Sunil Kumar

Sunil Kumar Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sunilc_

12 Jun
16 Github repositories for learning Databases:

Read 7 tweets
12 Jun
6 strategies that helped me grow my Twitter account to 23k followers:

I started building my audience on Twitter around a year ago when I realised the importance of having an online presence and the endless opportunities it provides.

Since then I've grown my account from 150 followers to 23k followers.

Just hard work will not get you followers. You need to follow certain strategies to achieve it. Basically the process consists of these 4 steps:

1. Post content/comment on others’ posts
2. Get users to visit your profile
3. Convert visitors to followers
4. Go back to step 1

Read 20 tweets
11 Jun
25 Github repositories every Software Developers should bookmark:

Freely Programming Books

Open Source Society University

JS & Node.js Testing Best Practices

Design patterns implemented in Java

Public APIs

The Algorithms - Python

Read 10 tweets
8 Jun
What are ACID properties in SQL databases?

In order to maintain consistency in a database, before and after any transaction, certain properties are followed. These are called ACID properties.

A -> Atomicity
C -> Consistency
I -> Isolation
D -> Durability

Let's discuss about each one of them in detail:

1⃣ Atomicity: Atomicity is basically "All or nothing rule".

When you're doing multiple write operations into your database, either all the operations are applied successfully or none.

Atomicity refers to the integrity of the entire database transaction.

Read 14 tweets
7 Jun
10 Best Github repositories for all web developers:

1. Node.js Best Practices

2. HTML5 Boilerplate

3. RealWorld
4. You Don't Know JS

5. Airbnb JavaScript Guide

6. Storybook
Read 5 tweets
5 Jun
Micro Services Architecture Vs Monolith Architecture:

Micro Services Architecture:

Micro Services is an architectural style where a single application is built as a suite of multiple smaller services which are loosely coupled, maintainable and scalable separately.

Let's discuss what that means.

Let's take the below example:

As you can see, our example application takes care of user accounts, reading and updating inventory and shipping the products to end users.

Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!