Published on

Data is cached everywhere, from the front end to the back end!

Authors

"🔹 1. Client apps: HTTP responses can be cached by the browser. We request data over HTTP for the first time, and it is returned with an expiry policy in the HTTP header; we request data again, and the client app tries to retrieve the data from the browser cache first.

🔹 2. CDN: CDN caches static web resources. The clients can retrieve data from a CDN node nearby.

🔹 3. Load Balancer: The load Balancer can cache resources as well.

🔹 4. Messaging infra: Message brokers store messages on disk first, and then consumers retrieve them at their own pace. Depending on the retention policy, the data is cached in Kafka clusters for a period of time.

🔹 5. Services: There are multiple layers of cache in a service. If the data is not cached in the CPU cache, the service will try to retrieve the data from memory. Sometimes the service has a second-level cache to store data on disk.

🔹 6. Distributed Cache: Distributed cache like Redis hold key-value pairs for multiple services in memory. It provides much better read/write performance than the database.

🔹 7. Full-text Search: we sometimes need to use full-text searches like Elastic Search for document search or log search. A copy of data is indexed in the search engine as well.

🔹 8. Database: Even in the database, we have different levels of caches:

  • WAL(Write-ahead Log): data is written to WAL first before building the B tree index

  • Bufferpool: A memory area allocated to cache query results

  • Materialized View: Pre-compute query results and store them in the database tables for better query performance

  • Transaction log: record all the transactions and database updates

  • Replication Log: used to record the replication state in a database cluster "

Data is cached everywhere, from the front end to the back end!

Author

ABN ASIA was founded by people with deep roots in academia, with work experience in the US, Holland, Hungary, Japan, South Korea, Singapore, and Vietnam. ABN Asia is where academy and technology meet opportunity. With our cutting-edge solutions and competent software development services, we're helping businesses level up and take on the global scene. Our commitment: Faster. Better. More reliable. In most cases: Cheaper as well.

Feel free to reach out to us whenever you require IT services, digital consulting, off-the-shelf software solutions, or if you'd like to send us requests for proposals (RFPs). You can contact us at contact@abnasia.org. We're ready to assist you with all your technology needs.

ABNAsia.org

© ABN ASIA