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!

PDF

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
github.com/EbookFoundatio…

Open Source Society University
github.com/ossu/computer-…

JS & Node.js Testing Best Practices
github.com/goldbergyoni/j…

πŸ‘‡πŸ»
Design patterns implemented in Java
github.com/iluwatar/java-…

Public APIs
github.com/public-apis/pu…

The Algorithms - Python
github.com/TheAlgorithms/…

πŸ‘‡πŸ»
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
github.com/goldbergyoni/n…

2. HTML5 Boilerplate
github.com/h5bp/html5-boi…

3. RealWorld
github.com/gothinkster/re…
4. You Don't Know JS
github.com/getify/You-Don…

5. Airbnb JavaScript Guide
github.com/airbnb/javascr…

6. Storybook
github.com/storybookjs/st…
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!

:(