HTTP Persistent Connections and HttpClient Connection Pool

HTTP Persistent Connections and HttpClient Connection Pool

(Click the public account above to quickly follow) Source: kingszelda, www.cnblogs.com/kingszelda/p/8988505.html 1. Background The HTTP protocol is a stateless protocol, meaning each request is independent of others. Therefore, its initial implementation was that each HTTP request would open a TCP socket connection, which would be closed after the interaction was complete. HTTP is a full-duplex … Read more

Practical TCP Connection Reuse: Analyzing HTTP Keep-Alive Through Packet Capture

Practical TCP Connection Reuse: Analyzing HTTP Keep-Alive Through Packet Capture

Practical TCP Connection Reuse: Analyzing HTTP Keep-Alive Through Packet Capture In modern web architecture, keep-alive connections have become a key technology for improving performance and reducing latency. This article uses real Wireshark packet capture data to fully restore a complete local loopback communication process, focusing on the analysis of the TCP connection reuse mechanism, helping … Read more

Bandwidth Reduced by 70% Just by Changing HTTPS to HTTP!

Bandwidth Reduced by 70% Just by Changing HTTPS to HTTP!

Introduction Hello everyone, I am MAI Mai Zao The reason is that a high-concurrency collection service went live, and the 100m upstream bandwidth was quickly saturated. Since this is a dedicated line and only this service is using it, it can be confirmed that it is the cause. However! This request is just a GET … Read more

What Happens During an HTTP Request?

What Happens During an HTTP Request?

Original link:https://blog.51cto.com/u_15155097/2719818 In this article, we will use a packet capture analysis tool to analyze how an <span><span>HTTP</span></span> request works. Environment Setup Initially, I wanted to find a website for packet capture analysis, but the <span><span>HTTP</span></span> requests in the production environment were too numerous and distracting, making analysis difficult. Therefore, I created a simple <span><span>demo</span></span> … Read more

Detailed Explanation of the MQTT Protocol Heartbeat Mechanism: How PINGREQ and PINGRESP Ensure Continuous Connection Activity

Detailed Explanation of the MQTT Protocol Heartbeat Mechanism: How PINGREQ and PINGRESP Ensure Continuous Connection Activity

In the MQTT protocol, Ping is a mechanism used to maintain the activity of the connection between the client and the server. It is implemented through two control messages: PINGREQ (heartbeat request) and PINGRESP (heartbeat response), ensuring that both parties are aware that the connection is still valid, especially in cases of prolonged inactivity. 1. … Read more

Detailed Explanation of MQTT Packets【04】: PINGREQ & PINGRESP Heartbeat Messages

Detailed Explanation of MQTT Packets【04】: PINGREQ & PINGRESP Heartbeat Messages

In previous articles, we introduced the following topics in MQTT 5.0:Detailed Explanation of MQTT Packets【01】: CONNECT & CONNACKDetailed Explanation of MQTT Packets【02】: PUBLISH & PUBACKDetailed Explanation of MQTT Packets【03】: SUBSCRIBE & UNSUBSCRIBENow, we will introduce the control packets used to maintain the connection: PINGREQ and PINGRESP. In addition to the control packets for connecting, publishing, … Read more

Improving Website Response Speed: Key Factors Affecting HTTP Performance

Improving Website Response Speed: Key Factors Affecting HTTP Performance

Our discussion on HTTP performance is based on the simplest model, which is the HTTP performance of a single server. Of course, this also applies to large-scale load-balanced clusters, as these clusters are composed of multiple individual HTTP servers. Additionally, we exclude scenarios where the client or server itself is overloaded or where different I/O … Read more

HTTP Connection Management in Go: Strategies for Long and Short Connections | Keep-Alive Optimization

HTTP Connection Management in Go: Strategies for Long and Short Connections | Keep-Alive Optimization

Click the “blue text” above to follow us Have you ever encountered a situation where the server inexplicably cannot handle the traffic? Despite having sufficient configuration, it keeps dropping connections. After checking for a long time, you find that the issue lies in HTTP connection handling. Think about it, HTTP connections are like tables in … Read more

Core Principles of Web Crawlers: How an HTTP Request is Completed

Core Principles of Web Crawlers: How an HTTP Request is Completed

Author: Da Mu Jiang https://my.oschina.net/luozhou/blog/3003053 Overview In the previous article, “Do You Know What Happens Behind the Scenes When You Ping?” we analyzed the process of a <span>Ping</span> using actual packet capture (a common interview question). We learned that <span>ping</span> relies on the <span>ICMP</span> protocol and also involves <span>ARP</span> requests in a local area network. … Read more

HTTP Persistent Connections and HttpClient Connection Pool

HTTP Persistent Connections and HttpClient Connection Pool

Background The HTTP protocol is a stateless protocol, meaning each request is independent of others. Therefore, its initial implementation was to open a TCP socket connection for each HTTP request, which would be closed after the interaction was complete. HTTP is a full-duplex protocol, so establishing and closing connections requires three-way handshakes and four-way handshakes. … Read more