Tith Khem

Tith Khem k_tith

Where do we cache data?This diagram illustrates where we cache data in a typical architecture.There are multiple layers ...
21/07/2023

Where do we cache data?
This diagram illustrates where we cache data in a typical architecture.

There are multiple layers along the flow.

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.

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

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

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.

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.

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.

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.

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

Over to you: With the data cached at so many levels, how can we guarantee the sensitive user data is completely erased from the systems?

--

How to explain CI/CD to a kid -🚀👨‍💻 Coding isn't just about writing brilliant lines of code - it's also about making sur...
18/07/2023

How to explain CI/CD to a kid -

🚀👨‍💻 Coding isn't just about writing brilliant lines of code - it's also about making sure that code works well with the rest of the software system.

That's where the magic of CI/CD comes into play! 💫

1️⃣ 𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗼𝘂𝘀 𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗶𝗼𝗻 (𝗖𝗜): Imagine you and your friends are each working on different parts of this LEGO tower.

It would be chaos if everyone tried to put their pieces together at the end, right?

Things might not fit, or the tower could collapse because something was not right.

So, instead, each time you or a friend adds a new part (like a new piece of code), you immediately attach it to the tower (or "integrate" it).

That way, you can quickly see if it fits right or if it makes the tower unstable, and fix any problems when they're still small and manageable.

2️⃣ 𝗖𝗼𝗻𝘁𝗶𝗻𝘂𝗼𝘂𝘀 𝗗𝗲𝗹𝗶𝘃𝗲𝗿𝘆 (𝗖𝗗): Now, suppose you want to show your LEGO tower to your parents every evening when they come back from work.

You wouldn't want to show them a tower that's not stable or is incomplete, right?

So, you make sure that the tower is always in a state that's good enough to show off (like a program that's ready to be delivered).

Each time you add a piece, you also make sure it's attached properly and looks good (you "deliver" it).

That way, your LEGO tower is always ready to be presented.

So, CI/CD in the world of coding is like constantly adding to and improving your LEGO tower, and always having it ready to show off.

In actuality,

🔧 Continuous Integration (CI) a development practice where developers integrate code into a shared repository frequently, preferably several times a day.

Each integration is then automatically verified and tested to detect integration errors as quickly as possible.

This approach allows teams to identify and address bugs quicker, improve software quality, and reduce the time it takes to validate and release new software updates.

🚚 Continuous Delivery (CD) is an extension of continuous integration.

It involves automatically preparing the code for release to production after passing a series of tests.

The goal is to have a codebase that is always ready for deployment to a live environment.

💡𝗝𝗲𝗻𝗸𝗶𝗻𝘀 𝗣𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀: Jenkins is an open-source automation server, and a Jenkins Pipeline is a suite of plugins that supports implementing and integrating continuous delivery pipelines into Jenkins.

A pipeline has an extensible automation server for creating simple or complex delivery pipelines "as code" via pipeline DSL (Domain-specific Language).

Remember, CI/CD isn't a one-size-fits-all solution; it's more of a philosophy or set of practices tailored to an organization's specific needs.

If you're not using CI/CD, you're missing out on a number of benefits.

Image Credit - on twitter.
Credits : Brij kishore Pandey Sir

អនាគតជាងកាត់សក់អាចនឹងអត់កាងារធ្វើ😂
20/04/2023

អនាគតជាងកាត់សក់អាចនឹងអត់កាងារធ្វើ😂

បុរសល្អប្រែទៅជាបងប្រុសច្រើនណាស់!
20/03/2022

បុរសល្អប្រែទៅជាបងប្រុសច្រើនណាស់!

Address

6A
Kampong Cham
12000

Telephone

+85516760504

Website

Alerts

Be the first to know and let us send you an email when Tith Khem posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Tith Khem:

Share