Who ‘Killed’ Your HTTP Connection?

Who 'Killed' Your HTTP Connection?

Hello everyone, I am Tony Bai. Have you encountered intermittent errors in a production environment such as <span>EOF</span>, <span>connection reset by peer</span>, or <span>unexpected end of stream</span>? Have you checked the code logic, firewall rules, or even captured packets, only to find that everything is normal at the application layer, yet requests occasionally fail? The … Read more

Comprehensive Guide to HttpClient: From HTTP Request Principles to High Concurrency Practices

Comprehensive Guide to HttpClient: From HTTP Request Principles to High Concurrency Practices

01 Introduction Before Java 11, the HttpURLConnection feature provided by the standard library was quite basic. It was difficult to handle complex HTTP scenario requirements, such as connection pool management, asynchronous requests, and flexible retries. Apache HttpClient, as one of the most mature and comprehensive HTTP client libraries in the Java ecosystem, has been widely … Read more

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

Understanding TCP, HTTP, Socket, and Socket Connection Pool

Understanding TCP, HTTP, Socket, and Socket Connection Pool

Every evening at 18:00, let's grow together! Source: sf.gg/a/1190000014044351 Introduction As developers, we often hear terms like <span>HTTP protocol, TCP/IP protocol, UDP protocol, Socket, Socket long connection, Socket connection pool</span>. However, not everyone can clearly understand their relationships, differences, and principles. This article will explain their relationships step by step, starting from the basics of … Read more

Understanding urllib3: A Powerful HTTP Client Library

Understanding urllib3: A Powerful HTTP Client Library

Click 【Follow + Collect】 to get the latestpractical code examples Knowledge Point Explanation urllib3 is a powerful, stable, and low-level HTTP client library that is a key dependency of the requests library. In office automation scenarios, when operations involve interaction with network resources, urllib3 plays a crucial role. 1. Connection Pool Management urllib3 provides connection … Read more

Parallel Computing in Python: A Detailed Guide to the Multiprocessing Library

Parallel Computing in Python: A Detailed Guide to the Multiprocessing Library

Today, we will explore a very powerful library in Python – the Multiprocessing library. Imagine if you are handling a task that requires a lot of computation, such as analyzing large datasets or running complex simulations, but your computer has multiple CPU cores and can only use one. Isn’t that a waste? The Multiprocessing library … Read more

Introduction to Python Series Part 12 (Database Operations)

Introduction to Python Series Part 12 (Database Operations)

1. Introduction In application development, data management, such as data storage and retrieval, is a fundamental requirement. Regardless of the type or scale of the application, data storage management is essential. In most business applications, the two most commonly used types of databases are NoSQL databases, such as Redis, and relational databases, such as MySQL. … Read more

Understanding HTTP Connection Pools and Their Benefits

Understanding HTTP Connection Pools and Their Benefits

From: May’s Cangjie Cause During the 6.1 major promotion, a problem was discovered during duty hours: an RPC interface showed high response time (RT) during the peak order placement time from 0 to 2 AM (over 1s, even though this interface was optimized, an RT over this value is problematic; typically, even complex logic in … 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

Understanding TCP, HTTP, Socket, and Socket Connection Pool

Understanding TCP, HTTP, Socket, and Socket Connection Pool

Author: Shulan Technology Source: www.jianshu.com/p/e47a766e03da Introduction: As a developer, we often hear terms like HTTP protocol, TCP/IP protocol, UDP protocol, Socket, Socket long connection, Socket connection pool, etc. However, not everyone can clearly understand their relationships, differences, and principles. This article will start from the basics of network protocols and explain the relationship between them … Read more