As David Wheeler said:
All problems in computer science can be solved by another level of indirection.
The idea of proxy is reflected in many fields of computers. In essence, A and B can communicate directly, but we add C as an intermediary, and A and B communicate through C.
We all know that the establishment of TCP connection has "3-Way Handshake Connection and 4-Way Handshake Termination", but what exactly happened in the middle? Why is the number of handshake more in termination? What if only 2-Way Handshake are used? What will happen if there is network delay or packet loss during the handshake? This article will give you the answer.
Kafka is currently the most mainstream distributed stream processing platform. It is widely used for its high throughput, persistence, horizontal scalability, support for stream data processing and other features.
In the scenario of big data, we all know that when the number of single tables reaches 20 million or 2 GB, it is necessary to shard the database and table. However, after all data is sharded according to the specified sharding key, a new problem will arise: How to query non-sharding key? Of course, we can quickly think of a violent method, which is to use multiple threads to search all partitions at the same time, and then merge and summarize the results of each thread. But obviously this solution is very inefficient.
Can we directly determine which partition this data is in from the non-sharding key? The answer is: Yes. This article will introduce one of the methods: Gene method.
"Consistent Hash" seems to be a confusing name, because the result of the hash function should be the same no matter where it is calculated, so why is there a consistency problem?
In a distributed system, there are usually many nodes. If the nodes need to reach a consensus, ensuring the consistency between the nodes has become a concern for all distributed systems.
I have been updating my blog recently and encountered three very troubling problems:
git add
command, there is always a Warning prompt: Warning: in the working copy of CRLF will be replaced by LF the next time Git touches it.
git clone
a new repo
will directly display the file modified
, even though nothing has been changed.Later, I found that these 3 problems were actually caused by one problem: the CRLF
symbol. Many people who searched online also encountered the same problem, Everyone said that we need to change the configuration of Git, but no one has explained the principle clearly. I will write a document to record it today.
A website for study notes.
ShenZhen, China
Dear readers,
Thank you for visiting my blog! I want to acknowledge that there aren't many posts in English here at the moment. As a native Chinese speaker, I've always written primarily in Chinese. However, I'm now working to translate my existing content into English to reach more readers.
This process involves using tools like Google Translate, so you may encounter occasional less-than-perfect expressions. I truly appreciate your understanding and patience as I navigate this transition.
The translation effort will take time, but I'm committed to bringing more content to you in English. Thank you for your support and for sticking around! 😄