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

50 min read

Kafka Deep Dive: 5 Roles, 3 Mappings & a Message's Full Journey from Producer to Consumer

This article dissects Kafka's core architecture through five roles, three-layer mappings, and a message's complete lifecycle, illustrating with six diagrams, two production configs, and three real incidents covering consumer stalls, disk-full broker crashes, and silent ISR shrinkage causing data loss.

57 min read

OpenResty Dynamic Gateway: Phases, Cosocket, Shared Dict & Production Patterns

This article explains how to build a dynamic API gateway with OpenResty by moving service discovery, canary routing, and TLS certificates from static config files into runtime memory, covering Nginx phases, non-blocking cosocket, atomic shared dict operations, and production hardening lessons from real incidents.

17 min read

Java 27 Structured Concurrency: Replacing CompletableFuture for Parallel Homepage Aggregation

The article demonstrates migrating a homepage aggregation API from CompletableFuture to Java 27's StructuredTaskScope, showing how structured concurrency simplifies parallel downstream calls by automatically managing task lifecycle, cancellation on failure, scope-level timeouts, virtual threads, and observability—reducing exception handling code by half while making concurrency semantics match business intent.

12 min read

Java 24 Stream Gatherers: 5 New Operations for Complex Data Processing

This article explores Java 24's new Stream Gatherers feature (JEP 485), demonstrating five built-in gatherers—windowFixed, windowSliding, scan, fold, and mapConcurrent—with code examples for batching, sliding windows, cumulative calculations, intermediate aggregation, and bounded concurrent mapping, plus a guide to building custom gatherers for stateful stream transformations.

8 min read

Simplify Multi-Value Mapping in Java with Apache Commons Collections MultiValuedMap

This tutorial demonstrates how Apache Commons Collections 4's MultiValuedMap interface eliminates boilerplate code when mapping keys to multiple values, covering core operations, three implementations (ArrayListValuedHashMap, HashSetValuedHashMap, UnmodifiableMultiValuedMap), and practical code examples with output.

15 min read

Java 27 Released: G1 Default GC, Post-Quantum TLS, Compact Object Headers & JFR Redaction

Java 27 introduces nine JEPs including making G1 the universal default garbage collector, adding post-quantum hybrid key exchange for TLS 1.3, enabling compact object headers by default, and redacting sensitive data in JFR recordings, plus performance gains in HashMap.putAll and AVX2 binary search.

33 min read

SpringBoot RabbitMQ/RocketMQ Integration: Reliable Delivery, Idempotent Consumption & Ordering Guarantees

A comprehensive guide covering message queue reliability patterns using SpringBoot with RabbitMQ and RocketMQ, including a real production incident analysis, core concepts, complete code implementation for reliable delivery, idempotent consumption with Redis SET NX, ordered processing, dead letter queues, and production-ready configurations.

25 min read

Utopia Deconstructed: Tracking Knowledge Changes with Dual Temporality and Provenance

This analysis of the open-source Utopia project reveals how it separates raw statements, ontologies, and typed facts to track knowledge changes using dual temporality (business time vs. system time), provenance, and audit trails, enabling queries for both current applicability and historical knowledge states, while highlighting practical deployment considerations.

49 min read

Nginx Rate Limiting Deep Dive: Leaky Bucket, Burst Config & Gateway vs Business Layer

This article analyzes Nginx rate limiting using limit_req and limit_conn, explaining the leaky bucket algorithm, burst and nodelay parameters, three production incidents, multi-layer defense configuration, cluster rate limiting strategies, key trust chains, monitoring, and interview questions.

40 min read

Nginx Caching Mastery: Proxy Cache Keys, Hit Rates & Cache-Control Matrix

This article provides a comprehensive guide to Nginx caching, covering browser vs proxy cache distinctions, Cache-Control directives, fingerprint-based static asset strategies, proxy_cache key design, stale-while-revalidate patterns, production configurations for static sites and API caching, source-code-level cache internals, cache hit rate measurement, purge strategies, and security hardening.

14 min read

Refactoring Data Validation with Java 8 Function and SFunction Interfaces

This article shows how to eliminate repetitive database validation code by creating generic reusable methods using Java 8 functional interfaces and MyBatis Plus SFunction, demonstrating ensureColumnValueValid, validateColumnValueMatchesExpected, and validateColumnValueInExpectedList with before-and-after comparisons.

7 min read

Spring-Smart-DI: Dynamic Provider Switching Without Restart Using @AutowiredProxySPI

This tutorial demonstrates how spring-smart-di's @AutowiredProxySPI annotation enables dynamic switching between service provider implementations by injecting a proxy that resolves the active implementation from configuration at runtime, eliminating manual bean lookups and allowing zero-restart changes via @EnvironmentProxySPI or custom config sources like databases.

40 min read

Nginx Location & Rewrite Deep Dive: 8 Priority Rules, 3 Flag Semantics, 10 Production Pitfalls

This comprehensive guide explains Nginx location matching priorities, rewrite flag semantics (last/break/redirect/permanent), and common production pitfalls through real incidents, source-code-level logic, debugging techniques, and 20 interview Q&As to help engineers avoid routing misconfigurations.

54 min read

Spring 7.0.8 Source Code: Move Beyond Interview Clichés to Framework Extension

This article explains why reading Spring Framework 7.0.8 source code enables developers to extend the framework rather than just memorize interview answers, covering core extension points like BeanPostProcessor, BeanFactoryPostProcessor, and BeanRegistrar, the three-level cache for circular dependencies, AOP proxy weaving, and practical debugging techniques.

15 min read

Seata 2.6.0 Integrates MCP: AI-Assisted Distributed Transaction Management

Seata 2.6.0 embeds an MCP server in its Console, letting AI clients query and manage distributed transactions via natural language with mandatory confirmation for destructive operations, covering tool categories, security design, setup steps, and real interaction examples.