Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
20 views
System Caching - Part 1
Uploaded by
satya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save System Caching - Part 1 For Later
Download
Save
Save System Caching - Part 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
20 views
System Caching - Part 1
Uploaded by
satya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save System Caching - Part 1 For Later
Carousel Previous
Carousel Next
Save
Save System Caching - Part 1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 7
Search
Fullscreen
47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu A Crash Course in Caching - Part 1 Alex Xu avers om Oe e Introduction Caching is a fundamental technique in computing that enables quick retrieval of frequently accessed data. A study conducted by Amazon found that increasing page load time by just 100 milliseconds costs 1% in sales. By storing frequently accessed data in faster storage, usually in memory, caching improves data retrieval speed and improves overall system performance. This highlights the significant impact caching can have on the user experience and ultimately on business success. The following is a list of the topics we will cover in this series. htpsblog.bytebytege.comipla-crash-course-n-caching-par-t47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu eee eee active invalidation fie! caching challenges ee What is a cache Definition: according to Wikipedia: “In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere”. Let's look at a concrete example. When a client/server request is made without caching, the client sends a request to the service, which then retrieves data from storage and sends it back to the client. However, retrieving data from storage can become slow and overloaded with high volumes of traffic. htpsblog.bytebytege.comipla-crash-course-n-caching-par-t a47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu ——1—+ }——— 2——»] Service ~—4—— — Client ‘Adding a cache to the system can help overcome these limitations. When data is requested, the service first checks the cache for the data. If the data is present in the cache, it is quickly returned to the service. If the data is not found in the cache, the service retrieves it from storage, stores it in the cache, and then responds to the client. This allows for faster retrieval of frequently accessed data since cache usually stores data in memory in a data structure optimized for fast access. Service Client J* Cache systems and storage systems differ in several ways. First, cache systems store frequently accessed data in memory. Storage systems store data on disks. Since memory is more expensive than disk, cache systems typically have much smaller data capacity than storage systems. This means that cache systems can store only a subset of the total data set. Second, the data stored in cache systems are not designed for long-term data persistence and durability. Cache systems are used to improve performance. They do not provide durable data storage. In contrast, storage systems are designed to provide long-term data persistence and durability, ensuring that data is always available when needed. Finally, cache systems are optimized for supporting heavy traffic and high concurrency. By storing data in memory, cache servers can respond quickly to incoming requests, htpsblog.bytebytege.comipla-crash-course-n-caching-par-t ar47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu which is crucial for high-traffic websites or applications. Storage systems, on the other hand, are better suited for durably storing and managing large amounts of data. If the data that is requested is available in the cache, it is known as a cache hit, otherwise, it is known as a cache miss. Because accessing data from the cache is significantly faster than accessing it from storage, the system overall operates more efficiently when there are more cache hits. The effectiveness of a cache is measured by the cache hit ratio, which is the number of cache hits divided by the number of cache requests, Higher ratios indicate better overall performance, Where is caching used While the previous example showcased caching in client/server computing, it is worth noting that caching is extensively used in modern computer and software systems. htpsblog.bytebytege.comipla-crash-course-n-caching-par-t47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu Modern computers utilize multiple levels of cache, including the L1, L2, and L3 caches, to provide fast access to frequently used data for the CPU. The Memory Management Unit (MMU) is responsible for mapping virtual memory addresses to physical memory addresses. The MMU contains a specialized cache called htpsblog.bytebytege.comipla-crash-course-n-caching-par-t47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu the Translation Lookaside Buffer (TLB), which stores the most recently used address translations to speed up the address translation process. The operating system employs a page cache in the main memory to enhance overall system performance. The page cache stores frequently accessed data pages and reduces the number of disk accesses, which can slow down the system. By utilizing these different levels of cache, modern computers can improve their overall performance and efficiency. In software systems, caching plays a crucial role in enhancing performance and reducing network latency. Browsers use a cache to store frequently accessed website images, data, and documents, resulting in faster load times and a smoother browsing experience. This cache is commonly known as the browser cache. Content Delivery Networks (CDNs) are another form of caching used to deliver static resources such as images, videos, CSS files, and other multimedia content. CDNs are a geographically distributed network of proxy servers that work together to deliver content from the nearest server to the user's location. This significantly reduces the time taken to access the content, resulting in a faster-loading website. Caching in databases is essential for improving performance and reducing execution overhead. Some typical caches found in databases include the buffer cache, result cache, query cache, metadata cache, and session cache. These caches store frequently accessed data blocks, query results, metadata, and session-specific information in memory to reduce disk reads and query execution time, resulting in faster query response times and a better user experience. Two idely used caching systems are Memcached and Redis. They are open-source, high-performance, distributed caching systems that can be used to store and retrieve data quickly. Real-world use cases for caching include storing historical emails locally to avoid repeatedly pulling the same data from the server, caching popular tweets on social htpsblog.bytebytege.comipla-crash-course-n-caching-par-t47723, 203 PM Acrash Course in Caching - Part 1 - by Alox Xu media websites like Twitter, and preloading and caching product information for flash sale systems to prevent excessive database pressure. Caching is an effective solution for scenarios where data changes infrequently, the same data is accessed multiple times, the same output is produced repeatedly, or the results of time-consuming queries or calculations are worth caching. While there are many different types of caches in hardware and software, this article will focus on the general caching use cases in system design, exploring its principles, strategies, and problems. Start trial © 2023 ByteByteGo » Privacy - Terms - Collection notice ‘Substack is the home for great writing htpsblog.bytebytege.comipla-crash-course-n-caching-par-t Ww
You might also like
Spring Boot Basics
PDF
No ratings yet
Spring Boot Basics
9 pages
Dsa
PDF
No ratings yet
Dsa
178 pages
SCJP Java Collections Mock Exam Questions
PDF
100% (1)
SCJP Java Collections Mock Exam Questions
30 pages
System Design Concepts
PDF
No ratings yet
System Design Concepts
36 pages
Scaling To Millions Users
PDF
No ratings yet
Scaling To Millions Users
21 pages
Divide Conquer
PDF
No ratings yet
Divide Conquer
7 pages
Java Bean Content Beyond
PDF
No ratings yet
Java Bean Content Beyond
6 pages
By Dr.Seema Jain
PDF
No ratings yet
By Dr.Seema Jain
1 page
Interview Question With Answer Imporant
PDF
No ratings yet
Interview Question With Answer Imporant
37 pages
Microservices QA
PDF
No ratings yet
Microservices QA
40 pages
Cucumber With Spring Boot
PDF
No ratings yet
Cucumber With Spring Boot
97 pages
02 Microservice Design and Architecture
PDF
No ratings yet
02 Microservice Design and Architecture
43 pages
Cloud Computing
PDF
No ratings yet
Cloud Computing
50 pages
An Introduction To Hazelcast - Baeldung
PDF
No ratings yet
An Introduction To Hazelcast - Baeldung
9 pages
Black Friday Flash Sale - by Alex Xu
PDF
No ratings yet
Black Friday Flash Sale - by Alex Xu
2 pages
16 - Using Service Dependency Graph To Analyze and Test Microservices
PDF
No ratings yet
16 - Using Service Dependency Graph To Analyze and Test Microservices
6 pages
Spring
PDF
No ratings yet
Spring
45 pages
Microservices FlashCard
PDF
No ratings yet
Microservices FlashCard
14 pages
Derived Queries With Spring Data JPA
PDF
No ratings yet
Derived Queries With Spring Data JPA
4 pages
Create Spring MVC Project On The Eclipse, Create A Spring MVC Project
PDF
No ratings yet
Create Spring MVC Project On The Eclipse, Create A Spring MVC Project
7 pages
Bollinger Bands: Bollinger Bands and The Related Indicators %B and Bandwidth Are
PDF
No ratings yet
Bollinger Bands: Bollinger Bands and The Related Indicators %B and Bandwidth Are
4 pages
Exam Microservices
PDF
No ratings yet
Exam Microservices
3 pages
Java-Frequently Asked Interview Questions
PDF
No ratings yet
Java-Frequently Asked Interview Questions
2 pages
Systemdesign
PDF
No ratings yet
Systemdesign
36 pages
Vinay Reddy G Java
PDF
No ratings yet
Vinay Reddy G Java
7 pages
Java 8 Streams Cheat Sheet
PDF
No ratings yet
Java 8 Streams Cheat Sheet
1 page
Istio Service Mesh Summary1 8th April 2023
PDF
No ratings yet
Istio Service Mesh Summary1 8th April 2023
4 pages
Practice Exam 4.NA
PDF
No ratings yet
Practice Exam 4.NA
8 pages
Mockito Presentation
PDF
No ratings yet
Mockito Presentation
23 pages
6) Spring Security Core
PDF
No ratings yet
6) Spring Security Core
69 pages
Doji Pattern: Neutral
PDF
No ratings yet
Doji Pattern: Neutral
4 pages
IBM Java Garbage Collection Tuning
PDF
No ratings yet
IBM Java Garbage Collection Tuning
55 pages
Problem Solving Sheet
PDF
No ratings yet
Problem Solving Sheet
15 pages
Spring Security
PDF
No ratings yet
Spring Security
2 pages
A Pattern Language For Microservices Chris Richardson
PDF
No ratings yet
A Pattern Language For Microservices Chris Richardson
68 pages
Microservices 1640736150
PDF
No ratings yet
Microservices 1640736150
9 pages
Leetcode - Common Patterns
PDF
No ratings yet
Leetcode - Common Patterns
21 pages
Download Complete (Ebook) Enterprise Java Microservices by Ken Finnigan ISBN 9781617294242, 1617294241 PDF for All Chapters
PDF
100% (8)
Download Complete (Ebook) Enterprise Java Microservices by Ken Finnigan ISBN 9781617294242, 1617294241 PDF for All Chapters
65 pages
DISTRIBUTEDSYSTEMSDesignGurus Io
PDF
No ratings yet
DISTRIBUTEDSYSTEMSDesignGurus Io
17 pages
Web Application Architecture Overview
PDF
No ratings yet
Web Application Architecture Overview
15 pages
Singleton Pattern
PDF
No ratings yet
Singleton Pattern
6 pages
Spring Boot Framework 4
PDF
No ratings yet
Spring Boot Framework 4
29 pages
How Hashmap Works in Java
PDF
No ratings yet
How Hashmap Works in Java
6 pages
DSA & Java Lectures
PDF
No ratings yet
DSA & Java Lectures
54 pages
Public Class: Singleton, Prototype, Request, Session and Global Session
PDF
No ratings yet
Public Class: Singleton, Prototype, Request, Session and Global Session
6 pages
Strategy Pattern
PDF
No ratings yet
Strategy Pattern
10 pages
Java Questionnaire
PDF
No ratings yet
Java Questionnaire
2 pages
Microservice Interview FAQs
PDF
No ratings yet
Microservice Interview FAQs
2 pages
Spring Boot Interview Questions
PDF
100% (1)
Spring Boot Interview Questions
6 pages
Amazon Interview
PDF
No ratings yet
Amazon Interview
1 page
Microservices Notes
PDF
No ratings yet
Microservices Notes
4 pages
Spring Boot Actuator Spring Boot 2 Recipes A Problem-Solution Approach
PDF
No ratings yet
Spring Boot Actuator Spring Boot 2 Recipes A Problem-Solution Approach
15 pages
Microservices Basics
PDF
No ratings yet
Microservices Basics
53 pages
The Future of Spring Cloud Microservices After Netflix Era - DZone Microservices
PDF
No ratings yet
The Future of Spring Cloud Microservices After Netflix Era - DZone Microservices
10 pages
A Crash Course in Caching - Part 1 - by Alex Xu
PDF
No ratings yet
A Crash Course in Caching - Part 1 - by Alex Xu
9 pages
Ak Project
PDF
No ratings yet
Ak Project
21 pages
Caching Presentation
PDF
No ratings yet
Caching Presentation
14 pages
Cache
PDF
No ratings yet
Cache
22 pages
Advance Programming Week 7-8
PDF
No ratings yet
Advance Programming Week 7-8
4 pages
System Caching - Part 2
PDF
No ratings yet
System Caching - Part 2
7 pages