Tagged articles
103 articles
Page 1 of 2
Java Companion
Java Companion
Apr 30, 2026 · Backend Development

JDK 26 Introduces ofFileChannel: Simplify Large File Chunk Uploads

JDK 26 adds HttpRequest.BodyPublishers.ofFileChannel, letting developers read specific file segments directly from a shared FileChannel without copying data into heap memory, dramatically reducing memory usage and simplifying parallel chunk uploads to object storage such as OSS or S3.

FileChannelHttpClientLarge File Upload
0 likes · 12 min read
JDK 26 Introduces ofFileChannel: Simplify Large File Chunk Uploads
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 1, 2025 · Backend Development

Master Spring Boot 3: 151 Real‑World Cases on Retry, Concurrency, and HttpClient

This article introduces a continuously updated collection of 151 Spring Boot 3 practical examples, covering built‑in retry mechanisms, concurrency limits, and automatic HTTP client registration, complete with configuration snippets, code samples, and visual illustrations to help developers implement resilient backend services.

BackendHttpClientRetry
0 likes · 9 min read
Master Spring Boot 3: 151 Real‑World Cases on Retry, Concurrency, and HttpClient
Su San Talks Tech
Su San Talks Tech
Jul 21, 2024 · Backend Development

8 Effective Retry Strategies for Java APIs

This article presents eight practical retry mechanisms for Java applications—including loop, recursion, HttpClient configuration, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries—along with code examples, configuration snippets, and best‑practice guidelines to help developers handle transient network failures reliably.

HttpClientRetrybest practices
0 likes · 17 min read
8 Effective Retry Strategies for Java APIs
macrozheng
macrozheng
Apr 22, 2024 · Backend Development

Mastering Retry Strategies in Java: 8 Practical Implementations

This article explains why retry mechanisms are essential for unreliable network calls in distributed systems and presents eight concrete Java implementations—including loop, recursion, HttpClient built‑in, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool, and message‑queue approaches—plus best‑practice guidelines to avoid common pitfalls.

HttpClientRetryresilience4j
0 likes · 16 min read
Mastering Retry Strategies in Java: 8 Practical Implementations
Java Architect Essentials
Java Architect Essentials
Feb 23, 2024 · Backend Development

Optimizing Apache HttpClient for High-Concurrency Scenarios

This article explains how to improve a high‑traffic Java service by reusing a singleton HttpClient, enabling keep‑alive, configuring a pooling connection manager, and adding an idle‑connection monitor, which reduces average request latency from 250 ms to about 80 ms.

BackendConnectionPoolingHttpClient
0 likes · 11 min read
Optimizing Apache HttpClient for High-Concurrency Scenarios
Architect
Architect
Jan 13, 2024 · Backend Development

Mastering API Retry Strategies in Java: 8 Proven Techniques

This article walks through eight practical ways to implement retry mechanisms for remote API calls in Java, covering simple loops, recursion, Apache HttpClient settings, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries, while highlighting trade‑offs and best‑practice guidelines.

HttpClientRetrybest practices
0 likes · 18 min read
Mastering API Retry Strategies in Java: 8 Proven Techniques
Architect
Architect
Jan 1, 2024 · Backend Development

Optimizing Apache HttpClient for High-Concurrency Scenarios

This article details a step‑by‑step optimization of Apache HttpClient—including connection pooling, keep‑alive, singleton client usage, timeout tuning, and response handling—to reduce average request latency from 250 ms to about 80 ms in a high‑throughput Java service.

BackendConnectionPoolingHttpClient
0 likes · 12 min read
Optimizing Apache HttpClient for High-Concurrency Scenarios
macrozheng
macrozheng
Dec 12, 2023 · Backend Development

Mastering Retry Strategies in Java: 8 Proven Methods for Reliable API Calls

This article explains why retry mechanisms are essential for distributed Java applications and walks through eight practical implementations—including loop, recursion, Apache HttpClient, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries—plus best‑practice guidelines to avoid common pitfalls.

HttpClientRetryconcurrency
0 likes · 17 min read
Mastering Retry Strategies in Java: 8 Proven Methods for Reliable API Calls
Java Architect Essentials
Java Architect Essentials
Nov 28, 2023 · Backend Development

Various Ways to Send HTTP Requests in Java

This article introduces multiple Java approaches for sending HTTP GET and POST requests, covering the built‑in HttpURLConnection class, Apache HttpClient, Square's OkHttp, and Spring's RestTemplate, with step‑by‑step explanations and complete code examples for each method.

BackendHTTPHttpClient
0 likes · 8 min read
Various Ways to Send HTTP Requests in Java
Sanyou's Java Diary
Sanyou's Java Diary
Oct 30, 2023 · Backend Development

Mastering API Retry Strategies in Java: 8 Proven Techniques

This article presents eight practical ways to implement retry mechanisms for third‑party API calls in Java, covering simple loops, recursion, built‑in HttpClient handlers, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries, plus best‑practice guidelines.

HttpClientMessageQueueconcurrency
0 likes · 17 min read
Mastering API Retry Strategies in Java: 8 Proven Techniques
Java Architect Essentials
Java Architect Essentials
Sep 30, 2023 · Backend Development

Optimizing Apache HttpClient for High Concurrency: Pooling, Keep‑Alive, and Configuration

This article explains how to dramatically improve the performance of a high‑traffic Java service by reusing a singleton HttpClient, enabling connection pooling and keep‑alive, tuning timeout and retry settings, and adding an idle‑connection monitor to reduce average request latency from 250 ms to about 80 ms.

BackendConnectionPoolingHttpClient
0 likes · 13 min read
Optimizing Apache HttpClient for High Concurrency: Pooling, Keep‑Alive, and Configuration
MaGe Linux Operations
MaGe Linux Operations
Sep 11, 2023 · Backend Development

How to Cut HttpClient Latency by 70% with Connection Pooling and Keep-Alive

By refactoring a high‑traffic Java service to use a singleton HttpClient, enable connection pooling with a custom keep‑alive strategy, and fine‑tune timeout and retry settings, the average request time dropped from 250 ms to about 80 ms, dramatically improving throughput and stability.

Connection PoolingHttpClientKeep-Alive
0 likes · 13 min read
How to Cut HttpClient Latency by 70% with Connection Pooling and Keep-Alive
Architecture Digest
Architecture Digest
Sep 11, 2023 · Backend Development

Optimizing Apache HttpClient for High-Concurrency Scenarios

This article details practical optimization techniques for Apache HttpClient—including connection pooling, keep-alive, singleton client usage, proper timeout settings, and asynchronous handling—to reduce average request latency from 250 ms to about 80 ms in a ten-million-calls-per-day service.

Connection PoolingHttpClientKeep-Alive
0 likes · 11 min read
Optimizing Apache HttpClient for High-Concurrency Scenarios
Top Architect
Top Architect
Mar 30, 2023 · Backend Development

Calling External APIs in Spring Boot: HttpClient, RestTemplate, and Feign

This article explains how to invoke external services from a Spring Boot application using three approaches—raw HttpClient, RestTemplate, and Feign—providing code examples, configuration steps, and tips for handling headers and tokens to ensure successful API communication.

APIHttpClientSpringBoot
0 likes · 12 min read
Calling External APIs in Spring Boot: HttpClient, RestTemplate, and Feign
Java Architecture Diary
Java Architecture Diary
Jan 10, 2023 · Backend Development

Master Java 11 HttpClient: Synchronous & Asynchronous Requests Explained

This article introduces Java 11's built-in HttpClient, compares it with legacy HttpURLConnection and third-party libraries, and provides detailed code examples for creating and configuring HttpRequest objects, sending synchronous and asynchronous requests, handling headers, timeouts, bodies, and demonstrates a custom mica-http wrapper for practical use.

AsynchronousBackendHttpClient
0 likes · 11 min read
Master Java 11 HttpClient: Synchronous & Asynchronous Requests Explained
Architect's Guide
Architect's Guide
Jan 4, 2023 · Backend Development

Understanding Cross-Origin Issues and Solutions with Spring Cloud Gateway and HttpClient

This article explains why browsers enforce same‑origin policies causing CORS problems, outlines common remedies such as the @CrossOrigin annotation, HttpClient usage, and Spring Cloud Gateway integration, and provides detailed configuration and code examples for implementing these solutions in a Java backend.

CORSHttpClientSpring Cloud Gateway
0 likes · 13 min read
Understanding Cross-Origin Issues and Solutions with Spring Cloud Gateway and HttpClient
Selected Java Interview Questions
Selected Java Interview Questions
Dec 14, 2022 · Backend Development

Comprehensive Guide to Building a SpringBoot Backend with HttpClient, Token Management, Redis Caching, and Rate Limiting

This article provides a step‑by‑step tutorial on creating a SpringBoot demo that integrates Apache HttpClient for GET/POST requests, handles token acquisition and caching with Redis, optimizes configuration via application.yml, and implements distributed locking and Guava‑based rate limiting for high‑concurrency scenarios.

HttpClientSpringBootjava
0 likes · 22 min read
Comprehensive Guide to Building a SpringBoot Backend with HttpClient, Token Management, Redis Caching, and Rate Limiting
Top Architect
Top Architect
Nov 22, 2022 · Backend Development

Handling Cross‑Origin Requests with Spring Cloud Gateway, @CrossOrigin Annotation, and HttpClient

The article explains why browsers enforce same‑origin policies, then presents three practical ways to solve cross‑origin issues in a Spring Boot backend—using the @CrossOrigin annotation, routing through Spring Cloud Gateway, and making server‑side requests with HttpClient—accompanied by configuration examples and full code snippets.

CORSHttpClientSpring Boot
0 likes · 12 min read
Handling Cross‑Origin Requests with Spring Cloud Gateway, @CrossOrigin Annotation, and HttpClient
Architect
Architect
Nov 18, 2022 · Backend Development

Handling Cross‑Origin Issues with @CrossOrigin, Spring Cloud Gateway, and HttpClient

This article explains why browsers enforce same‑origin policies, presents common CORS solutions such as the @CrossOrigin annotation, gateway integration with Spring Cloud Gateway, and using HttpClient, and provides detailed configuration and code examples for implementing these approaches in a Java backend project.

BackendCORSHttpClient
0 likes · 11 min read
Handling Cross‑Origin Issues with @CrossOrigin, Spring Cloud Gateway, and HttpClient
Java Architect Essentials
Java Architect Essentials
Nov 17, 2022 · Backend Development

Handling Cross-Origin Issues with Spring Cloud Gateway and HttpClient in Java

This article explains why browsers enforce same‑origin policies, presents common CORS solutions such as the @CrossOrigin annotation, HttpClient usage, and Spring Cloud Gateway integration, and provides detailed code examples for configuring gateways, CORS filters, and making HTTP requests in Java backend projects.

CORSCross-OriginHttpClient
0 likes · 14 min read
Handling Cross-Origin Issues with Spring Cloud Gateway and HttpClient in Java
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
Nov 14, 2022 · Backend Development

How Go’s HttpClient Implements Timeout with Context – A Deep Dive

This article compares Java’s HttpClient timeout implementation with Go’s built‑in HttpClient, explains Go’s Context‑based timeout mechanism, walks through the underlying source code, and shows why Java cannot easily replicate the same approach due to differences in concurrency primitives.

HttpClientTimeoutconcurrency
0 likes · 15 min read
How Go’s HttpClient Implements Timeout with Context – A Deep Dive
High Availability Architecture
High Availability Architecture
Sep 7, 2022 · Backend Development

Analysis and Optimization of HttpClient Connection Management in High‑Concurrency Scenarios

The article investigates frequent HttpClient connection‑pool exhaustion caused by excessive CLOSE_WAIT sockets in a high‑traffic Java service, explains the underlying TCP and HttpClient mechanisms, presents diagnostic commands and code snippets, and offers concrete configuration and architectural recommendations to prevent similar issues.

ConnectionPoolingHttpClientTCP
0 likes · 16 min read
Analysis and Optimization of HttpClient Connection Management in High‑Concurrency Scenarios
Selected Java Interview Questions
Selected Java Interview Questions
Sep 6, 2022 · Backend Development

Various Ways to Call Third‑Party HTTP APIs in Java

This article explains multiple approaches for invoking third‑party HTTP APIs in Java, covering JDK HttpURLConnection, Apache HttpClient, CloseableHttpClient, SpringBoot RestTemplate, and OkHttp, with detailed code examples, configuration steps, and usage patterns for GET and POST requests.

APIHTTPHttpClient
0 likes · 27 min read
Various Ways to Call Third‑Party HTTP APIs in Java
vivo Internet Technology
vivo Internet Technology
Aug 10, 2022 · Backend Development

Why HttpClient Connections Stay in CLOSE_WAIT and How to Fix Them

An in‑depth analysis of a production incident where HttpClient connections accumulated in CLOSE_WAIT, covering symptom identification, TCP state inspection, root‑cause debugging, HttpClient pool internals, and practical configuration tweaks to prevent similar outages.

CLOSE_WAITConnectionPoolHttpClient
0 likes · 16 min read
Why HttpClient Connections Stay in CLOSE_WAIT and How to Fix Them
Selected Java Interview Questions
Selected Java Interview Questions
Jun 9, 2022 · Backend Development

Optimizing Apache HttpClient for High‑Concurrency: Connection Pooling, Keep‑Alive, and Configuration

This article explains how to dramatically reduce the average response time of a high‑traffic Java service from 250 ms to about 80 ms by applying HttpClient pooling, keep‑alive strategies, proper timeout settings, and idle‑connection monitoring, complete with code examples and configuration details.

Connection PoolingHttpClientKeep-Alive
0 likes · 11 min read
Optimizing Apache HttpClient for High‑Concurrency: Connection Pooling, Keep‑Alive, and Configuration
FunTester
FunTester
Feb 10, 2022 · Backend Development

How to Implement Load‑Balancing with a Custom Java DNS Resolver

This article explains why the default InMemoryDnsResolver cannot provide load balancing, shows how to create a custom SystemDefaultDnsResolver that randomly selects IPs, and demonstrates single‑thread, multi‑thread, and single‑connection pool tests to verify the behavior.

BackendDNSHttpClient
0 likes · 9 min read
How to Implement Load‑Balancing with a Custom Java DNS Resolver
FunTester
FunTester
Feb 6, 2022 · Backend Development

Collection of API and Interface Testing Articles and Resources

This curated list compiles numerous Chinese-language articles and tutorials covering API and interface testing techniques, including Java HttpClient usage, Spring Boot integration, socket and WebSocket testing, performance measurement, automation frameworks, and related tools, offering developers practical guidance for backend service validation.

API testingBackendHttpClient
0 likes · 12 min read
Collection of API and Interface Testing Articles and Resources
Programmer DD
Programmer DD
Oct 7, 2021 · Fundamentals

Unlock Java 11: Powerful New String APIs, Collections, and More

This article walks through Java 11’s most useful enhancements—including new String methods, simplified collection‑to‑array conversion, predicate negation, var in lambda parameters, streamlined file I/O, nested class access rules, and HTTP/2 support—providing concise code examples for each feature.

CollectionsFile I/OHttpClient
0 likes · 8 min read
Unlock Java 11: Powerful New String APIs, Collections, and More
Programmer DD
Programmer DD
Oct 2, 2021 · Fundamentals

What New APIs Does Java 9 Bring? Collections, Streams, Optional, and More

Java 9 introduces several notable enhancements—including immutable collection factories, expanded Stream operations like ofNullable, iterate, takeWhile, dropWhile, new Optional methods, simplified try‑with‑resources, private interface methods, a modern HttpClient, and preliminary Flow support—each illustrated with concise code examples for developers transitioning from earlier Java versions.

HttpClientJava 9Stream API
0 likes · 7 min read
What New APIs Does Java 9 Bring? Collections, Streams, Optional, and More
FunTester
FunTester
Aug 24, 2021 · Backend Development

Can Async HTTP Requests Really Boost Test Performance? A Practical Java NIO Study

This article explores the practical impact of asynchronous HTTP requests in Java NIO‑based performance testing, detailing server setup with Moco, baseline measurements, various async implementations, and the trade‑offs between raw speed gains and CPU consumption.

Async HTTPHttpClientPerformance Testing
0 likes · 10 min read
Can Async HTTP Requests Really Boost Test Performance? A Practical Java NIO Study
FunTester
FunTester
Aug 17, 2021 · Backend Development

Boost HTTP Client Performance with Java NIO and Async Callbacks

This article explains how Java NIO's non‑blocking I/O can accelerate HTTP interface testing by offloading response handling to separate threads, presents a simple request‑time model, and provides concrete async HttpClient code examples with logging and JSON parsing.

AsyncBackendHTTP
0 likes · 9 min read
Boost HTTP Client Performance with Java NIO and Async Callbacks
Top Architect
Top Architect
Aug 15, 2021 · Backend Development

Using HttpClientUtil for HTTP Requests and JSON Parsing in Java

This article demonstrates how to call third‑party APIs in Java projects by importing the HttpClientUtil utility, performing GET and POST requests (with and without parameters), handling JSON responses with a custom JsonUtils class, and includes complete code examples for each step.

HttpClientJSONREST API
0 likes · 12 min read
Using HttpClientUtil for HTTP Requests and JSON Parsing in Java
Selected Java Interview Questions
Selected Java Interview Questions
Aug 13, 2021 · Information Security

Understanding HTTPS: Encryption Methods, Handshake Process, and HttpClient Implementation

This article explains why HTTP lacks confidentiality, introduces symmetric, asymmetric, and hybrid encryption, describes the HTTPS handshake steps, and shows how Apache HttpClient builds SSL connections with code examples, highlighting key components such as SSLConnectionSocketFactory and HostnameVerifier.

HTTPSHttpClientSSL
0 likes · 15 min read
Understanding HTTPS: Encryption Methods, Handshake Process, and HttpClient Implementation
Java Captain
Java Captain
Jan 13, 2021 · Backend Development

Scheduled Email Sending with Spring Boot, JavaMail, and HttpClient

This tutorial demonstrates how to build a Spring Boot Maven project that fetches random sentences from an online API, configures JavaMail with POP3/SMTP credentials, and uses a scheduled task to automatically send emails, including deployment tips for Linux and Windows.

BackendEmailAutomationHttpClient
0 likes · 7 min read
Scheduled Email Sending with Spring Boot, JavaMail, and HttpClient
Top Architect
Top Architect
Sep 21, 2020 · Backend Development

Comparative Overview of Java HTTP Client Libraries: HttpURLConnection, Apache HttpComponents, Java 9 HttpClient, and OkHttp

This article compares four Java HTTP client options—HttpURLConnection, Apache HttpComponents HttpClient, the Java 9 HttpClient, and OkHttp—detailing their features, code examples, configuration capabilities, and suitability for projects that need connection pooling, DNS control, form/JSON support, and synchronous or asynchronous calls.

Apache HttpComponentsHTTPHttpClient
0 likes · 14 min read
Comparative Overview of Java HTTP Client Libraries: HttpURLConnection, Apache HttpComponents, Java 9 HttpClient, and OkHttp
360 Tech Engineering
360 Tech Engineering
Sep 11, 2020 · Backend Development

Key New Features of Java 11 and Practical Migration Guide

This guide explains why Java 11 is worth adopting, lists its major language and API enhancements over Java 8—including var type inference, improved collections, stream and HTTP client APIs—and provides detailed solutions for common migration issues such as missing JAXB modules and container‑aware JVM behavior.

BackendContainerHttpClient
0 likes · 6 min read
Key New Features of Java 11 and Practical Migration Guide
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 25, 2020 · Backend Development

Root Cause Analysis of OOM Caused by Misused HttpClient evictExpiredConnections and Keep‑Alive Issues

The article recounts a production OOM incident triggered by a misconfigured HttpClient evictExpiredConnections setting that caused uncontrolled thread growth, explains the underlying keep‑alive TCP behavior and NoHttpResponseException, and presents the corrective measures of using a singleton HttpClient and proper connection‑pool monitoring.

BackendHttpClientKeep-Alive
0 likes · 8 min read
Root Cause Analysis of OOM Caused by Misused HttpClient evictExpiredConnections and Keep‑Alive Issues
Programmer DD
Programmer DD
Jan 6, 2020 · Backend Development

How a Misconfigured HttpClient Connection Pool Triggered a System Avalanche

An engineer recounts how a high‑traffic promotion system suffered port exhaustion and thread‑pool overload due to a default max‑connections‑per‑host setting of two, leading to CPU spikes, process crashes, and a cascading failure, and outlines the investigation steps and preventive measures.

BackendConnection PoolHttpClient
0 likes · 10 min read
How a Misconfigured HttpClient Connection Pool Triggered a System Avalanche
ITPUB
ITPUB
Jan 5, 2020 · Backend Development

Why My HttpClient Connection Pool Crashed the System: A Thread Exhaustion Study

The author describes how a high‑traffic promotion system using HttpClient suffered massive thread and port exhaustion due to misconfigured connection‑pool parameters, details the investigation steps—including monitoring, jstack analysis, and source code review—and outlines corrective measures and preventive testing strategies.

Connection PoolHttpClientThread Exhaustion
0 likes · 10 min read
Why My HttpClient Connection Pool Crashed the System: A Thread Exhaustion Study
FunTester
FunTester
Jan 2, 2020 · Backend Development

How to Capture and Replay HTTP Requests with FunRequest in Java

This article explains how to extend a testing framework with a FunRequest class that records HTTP request and response details, provides fluent setters, supports GET and POST, and enables saving and reproducing requests for faster bug diagnosis.

HttpClientdebugginghttprequestbase
0 likes · 10 min read
How to Capture and Replay HTTP Requests with FunRequest in Java
Architect's Tech Stack
Architect's Tech Stack
Dec 30, 2019 · Fundamentals

New Features and Enhancements in Java 11

The article provides a comprehensive overview of Java 11’s new capabilities, including Unicode 10 support, the standardization of HttpClient, collection API improvements, dynamic compiler threads, advanced garbage collectors, nest‑based access control, added cryptographic algorithms, lambda‑var syntax, single‑file execution, Flight Recorder integration, removed modules, upgrade recommendations, and useful migration tools.

FlightRecorderGarbageCollectionHttpClient
0 likes · 10 min read
New Features and Enhancements in Java 11
FunTester
FunTester
Dec 26, 2019 · Backend Development

Deep‑Copying HttpRequestBase in Java: A Custom FunRequest Wrapper

This article explains why a separate HttpRequestBase object is needed for each concurrent request in a performance testing framework, and provides a complete Java implementation of a FunRequest class that offers deep‑copy, cloning, and fluent configuration of GET/POST HTTP requests.

BackendHttpClientcloning
0 likes · 8 min read
Deep‑Copying HttpRequestBase in Java: A Custom FunRequest Wrapper
Qunar Tech Salon
Qunar Tech Salon
Nov 8, 2019 · Backend Development

Analyzing and Resolving TCP CLOSE_WAIT Issues in Java HTTP Client with Apache HttpClient

This article investigates the root causes of excessive TCP CLOSE_WAIT connections in a Java service, explains TCP state transitions, demonstrates packet capture analysis, and details how improper use of Apache HttpClient and its connection pool leads to lingering sockets, offering concrete debugging steps and configuration fixes.

CLOSE_WAITConnection PoolHttpClient
0 likes · 32 min read
Analyzing and Resolving TCP CLOSE_WAIT Issues in Java HTTP Client with Apache HttpClient
FunTester
FunTester
Oct 5, 2019 · Backend Development

Reusable HttpClient Method for Uploading Files with Multipart Entity

This tutorial shows how to encapsulate a reusable Java HttpClient method that builds a multipart/form-data request, iterates over parameters, attaches binary file streams or text parts, and sets the resulting entity on an HttpPost object, with a Linux‑specific note.

HttpClientbackend-developmentfile upload
0 likes · 4 min read
Reusable HttpClient Method for Uploading Files with Multipart Entity
FunTester
FunTester
Sep 23, 2019 · Backend Development

How to Build a Robust GET Parameter Builder with Java URL Encoding

This article walks through improving a Java GET‑parameter concatenation utility by overloading methods, handling Chinese characters with java.net.URLEncoder, and providing reusable code for converting JSON or Map arguments into properly encoded query strings for HttpClient requests.

API testingBackendGET request
0 likes · 5 min read
How to Build a Robust GET Parameter Builder with Java URL Encoding
FunTester
FunTester
Sep 22, 2019 · Backend Development

How to Add Automatic Retry to Java HttpClient for Robust API Testing

This guide shows how to create a custom HttpRequestRetryHandler that intelligently retries failed HTTP calls—handling timeouts, connection errors, SSL issues, and idempotent requests—and integrates it into a CloseableHttpClient built with a connection pool and custom request configuration.

BackendConnectionPoolHttpClient
0 likes · 5 min read
How to Add Automatic Retry to Java HttpClient for Robust API Testing
FunTester
FunTester
Sep 15, 2019 · Backend Development

How to Build a Java HttpClient Spider for Scraping Movie Details and Download Links

This article explains how to update and use a Java HttpClient‑based spider that removes duplicate links, handles legacy page formats, extracts movie metadata and download URLs (magnet, ed2k, Baidu Pan), and stores the results in a MySQL database, with complete source code examples.

Data ExtractionHttpClientScraping
0 likes · 12 min read
How to Build a Java HttpClient Spider for Scraping Movie Details and Download Links
FunTester
FunTester
Sep 7, 2019 · Backend Development

Why Your HttpClient Throws SocketClosed and How Reordering the Close Fixes It

The article explains that a SocketClosed error in Apache HttpClient occurs when CloseableHttpResponse is closed before the response entity is fully consumed, and shows how moving the close() call after EntityUtils.consume resolves the issue, with before‑and‑after code examples.

CloseableHttpResponseEntityUtilsHttpClient
0 likes · 4 min read
Why Your HttpClient Throws SocketClosed and How Reordering the Close Fixes It
FunTester
FunTester
Aug 29, 2019 · Backend Development

Properly Releasing Resources with Apache HttpClient 4.5: Best Practices

This article explains why releaseConnection() is deprecated in HttpClient 4.5, introduces the PoolingHttpClientConnectionManager, and provides detailed code examples and step‑by‑step guidance for safely extracting response content, closing responses, consuming entities, releasing connections, and shutting down the HttpClient.

ApacheBackendHttpClient
0 likes · 4 min read
Properly Releasing Resources with Apache HttpClient 4.5: Best Practices
FunTester
FunTester
Aug 25, 2019 · Backend Development

Why HttpClient Skips Null Parameters and How to Fix It in Java

When using HttpClient for API testing, a JSONObject omits fields with null values, causing version parameters to be missing; initializing version strings to empty strings resolves the issue and ensures proper request payloads.

API testingHttpClientVersioning
0 likes · 5 min read
Why HttpClient Skips Null Parameters and How to Fix It in Java
FunTester
FunTester
Aug 19, 2019 · Backend Development

Simulating Multiple Simultaneous Logins with Apache HttpClient

This guide shows how to disable HttpClient's automatic cookie handling, manually extract and store Set‑Cookie headers, and bind cookies to individual user objects so that multi‑user, multi‑threaded API tests can simulate concurrent logins reliably.

API testingCookieHttpClient
0 likes · 7 min read
Simulating Multiple Simultaneous Logins with Apache HttpClient
FunTester
FunTester
Aug 17, 2019 · Backend Development

Using Java Reflection to Execute API Test Cases in an HttpClient Framework

The article presents a Java HttpClient testing framework that leverages reflection to dynamically invoke API methods, detailing optimized functions for running all test cases of an interface, single test cases, and the core execution logic that interacts with a MySQL database and records results.

HttpClientReflectionjava
0 likes · 5 min read
Using Java Reflection to Execute API Test Cases in an HttpClient Framework
FunTester
FunTester
Aug 15, 2019 · Backend Development

Boost Your Mac Load Test: Tuning sysctl and HttpClient for 20k+ Connections

This guide shares practical steps to overcome TIME_WAIT port exhaustion on macOS and optimize Apache HttpClient settings for high‑concurrency load testing, including sysctl tweaks for maximum file descriptors, port range adjustments, connection‑pool parameters, timeout configurations, and a custom connection‑recycling thread, enabling over 20 k concurrent requests without bottlenecks.

Connection PoolHttpClientLoad Testing
0 likes · 5 min read
Boost Your Mac Load Test: Tuning sysctl and HttpClient for 20k+ Connections
dbaplus Community
dbaplus Community
Jun 24, 2019 · Operations

Why Did Our Payment System Auto‑Recover? A Deep Dive into Queue Backlog and Transaction Locks

A new employee at an OTA company faced a mysterious outage where thousands of payment‑related messages piled up in the queue, the system auto‑recovered, and a detailed investigation revealed a stuck MySQL transaction caused by missing response timeout settings, leading to lock contention and message backlog.

HttpClientMessage Queueincident analysis
0 likes · 7 min read
Why Did Our Payment System Auto‑Recover? A Deep Dive into Queue Backlog and Transaction Locks
Qunar Tech Salon
Qunar Tech Salon
Apr 24, 2019 · Backend Development

Resolving HTTP ConnectionPoolTimeoutException and CLOSE_WAIT Issues in Java Applications

This article analyzes a production Java service that repeatedly hit org.apache.http.conn.ConnectionPoolTimeoutException due to exhausted HttpClient connection pools, explains how CLOSE_WAIT sockets are created when responses are not closed, and provides step‑by‑step code fixes and Tomcat configuration tweaks to eliminate the problem.

Connection PoolHttpClientTomcat
0 likes · 11 min read
Resolving HTTP ConnectionPoolTimeoutException and CLOSE_WAIT Issues in Java Applications
Xianyu Technology
Xianyu Technology
Jan 10, 2019 · Backend Development

Why Your Java HttpClient Leaks Files and How to Fix It

An in‑depth experiment shows that using Apache HttpClient 3.x without proper connection management quickly exhausts Linux file descriptors, causing “too many open files” errors, and explains the underlying fd limits, the role of SimpleHttpConnectionManager, and provides correct usage patterns for both HttpClient 3.x and 4.x, including connection pooling and idle‑connection cleanup.

ApacheHttpComponentsConnectionPoolingHttpClient
0 likes · 17 min read
Why Your Java HttpClient Leaks Files and How to Fix It
Java High-Performance Architecture
Java High-Performance Architecture
Oct 1, 2018 · Backend Development

Unlock Java 11: Powerful New Features You Need to Know

This article introduces Java 11's most useful enhancements—including the var keyword, new String utilities, collection factory methods, Stream API additions, InputStream.transferTo, and the revamped HttpClient—showing how each feature simplifies code and improves productivity for modern Java developers.

CollectionsHttpClientInputStream
0 likes · 7 min read
Unlock Java 11: Powerful New Features You Need to Know
Java Captain
Java Captain
Aug 4, 2018 · Backend Development

Java Web Crawler Framework with JD Book Data Extraction Example

This article introduces a modular Java web crawler framework built with Maven, explains its package structure (db, model, util, parse, main), details the data flow from URL fetching to HTML parsing using HttpClient and Jsoup, and provides a complete example that extracts book information from JD.com and stores it in MySQL.

BackendHttpClientWebCrawler
0 likes · 12 min read
Java Web Crawler Framework with JD Book Data Extraction Example
Qunar Tech Salon
Qunar Tech Salon
Apr 29, 2018 · Backend Development

Understanding Apache HttpClient's Default Retry Strategy and How to Disable It

This article examines the default retry mechanism of Apache HttpClient 4.5.5, explains how the RetryExec executor and DefaultHttpRequestRetryHandler work, details the conditions under which retries occur or are skipped, and shows how to disable automatic retries when building an HttpClient instance.

ApacheHttpClientRetry
0 likes · 13 min read
Understanding Apache HttpClient's Default Retry Strategy and How to Disable It