Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Backend Development

15 min read

Seata 2.6.0 Lets You Debug Distributed Transactions by Chatting with AI

Apache Seata 2.6.0 introduces an MCP Server in its Console, enabling developers to query global transactions, branch details, global locks, and server logs using natural language via AI clients like Cursor and Claude Desktop, with safety controls requiring human confirmation for write operations.

17 min read

Thread Pool Misuse in Production: Key Lessons from a Real Incident

A production timeout incident caused by unbounded CompletableFuture.get() calls and shared thread pools leads to a comprehensive guide on proper thread pool configuration, isolation, timeout handling, ThreadLocal cleanup, dynamic queue sizing, core thread calculation formulas, and ParallelStream pitfalls.

19 min read

Why Your @Validated Annotations Silently Fail: Spring Boot Method Validation Proxy Pitfalls

This article dissects Spring Boot's three validation paths — request body, controller parameters, and service methods — revealing why @Validated on service methods silently fails without a proxy, and details proxy creation conditions, self-invocation traps, collection validation syntax, exception mapping, and debugging steps.

114 min read

Building Enterprise Gateways with OpenResty: Rate Limiting, Auth & Observability

A comprehensive guide to consolidating multi-layer Nginx into a single programmable OpenResty gateway, covering Lua request phases, shared-memory rate limiting algorithms (leaky bucket, token bucket, distributed), dynamic configuration, authentication ordering, risk control tiers, performance tuning, and six production troubleshooting scenarios with concrete fixes.

46 min read

Spring Cloud Stream: Binder Abstraction, Partitioning, and Config Pitfalls

This article analyzes Spring Cloud Stream's binder abstraction, partitioning mechanics, and configuration pitfalls through real incidents, source code insights, and production guidelines, revealing why 'swap MQ without code changes' only half-works and how to avoid silent failures in message-driven systems.

43 min read

Spring Cloud Gateway Auth: OAuth2, JWT, and the Layer You Can't Bypass

This article dissects three real-world authentication failures in Spring Cloud Gateway, explaining why gateway-only auth is insufficient, how to reconcile stateless JWT with immediate revocation, and why downstream services must verify internal signatures rather than trust headers, with production-ready code and configuration patterns.

36 min read

Spring Cloud Tracing: TraceId Propagation Across Services, Threads & MQ

This article explains how TraceId propagates across services, threads, and message queues in Spring Cloud, covering W3C/B3 formats, Micrometer Tracing architecture, cross-thread context propagation via ThreadLocal and Reactor Context, MQ header injection, sampling strategies, and common pitfalls with solutions.

45 min read

Sentinel Internals: Sliding Window, Leaky Bucket & Circuit Breaker State Machine

This article deep-dives into Sentinel's core mechanisms including sliding window statistics, three rate-limiting algorithms, circuit breaker state machine, Slot chain execution flow, hotspot parameter limiting, rule persistence modes, Gateway/Feign integration, threshold calculation, and common pitfalls with troubleshooting steps.

16 min read

Spring Boot 2.6 Path Matching Upgrade: Fixing Broken Interceptor Patterns

This article explains how Spring Boot 2.6's switch from AntPathMatcher to PathPatternParser breaks existing path patterns in interceptors and static resources, details the syntax differences, shows how to fix patterns using {*path} capture groups, and provides troubleshooting techniques including actuator/mappings and unit testing with PathPatternParser.

24 min read

Spring Boot Hardware Integration via JNA: Card Readers, USB Keys, Printers & Serial Devices

A comprehensive guide to integrating hardware peripherals — ID card readers, USB Keys, receipt printers, and serial devices — into Spring Boot applications using JNA, covering library mapping, concurrency control, deployment patterns, and testability design.

17 min read

LatchUtils: Simplify Java Async Task Synchronization with One Utility Class

This article introduces LatchUtils, a lightweight Java utility that streamlines waiting for multiple asynchronous tasks by registering tasks first and then blocking once, comparing it against manual CountDownLatch and CompletableFuture approaches with code examples and a detailed feature comparison.

17 min read

Payment Reserve Funds Explained: From Multi-Bank Accounts to Centralized PBOC Storage

This article explains how payment institutions manage reserve funds (备付金), detailing the transition from direct bank connections with multiple accounts to centralized PBOC storage, covering key concepts like mapping quotas, available quotas, real-time clearing vs timed settlement, and the five core business flows: collection, payment, refund, clearing, and settlement.

39 min read

Spring Cloud Gateway Internals: Reactive Model, Filter Chains & High-Concurrency Tuning

This article analyzes Spring Cloud Gateway's reactive architecture through three production incidents, detailing route predicates, filter chain mechanics, source code flow, and four critical tuning dimensions—thread model, connection pooling, timeout hierarchy, and off-heap memory—to prevent gateway failures under high concurrency.

26 min read

OpenFeign & Load Balancing: Proxy Internals & Timeout Governance

This article dissects OpenFeign's declarative HTTP client internals, covering JDK dynamic proxy mechanics, load balancing integration, timeout pyramid design, connection pooling, retry disciplines, and common pitfalls with production-ready configurations and source-code walkthroughs.

24 min read

Nacos Service Discovery & Config Center: AP Model, Heartbeats & Hot Reload Explained

This article deep-dives into Nacos' dual role as service registry and config center, explaining its AP-based Distro protocol, heartbeat mechanisms, gRPC long-polling config push, @RefreshScope internals, deployment essentials, and eight common pitfalls with troubleshooting steps.