Programmer XiaoFu
Author

Programmer XiaoFu

xiaofucode.com – a programmer learning guide driven by the pursuit of profit

108
Articles
0
Likes
140
Views
0
Comments
Recent Articles

Latest from Programmer XiaoFu

100 recent articles max
Programmer XiaoFu
Programmer XiaoFu
Oct 10, 2024 · Databases

Three Strategies Big Companies Use to Manage Massive MySQL Tables

The article walks through how to assess MySQL table size, explains why large tables slow down due to B+‑tree index overhead, and compares three practical solutions—table partitioning, database sharding (horizontal, vertical, hash‑range), and hot‑cold archiving—while outlining their trade‑offs and selection criteria.

Database ScalingHot Cold ArchivingMySQL
0 likes · 16 min read
Three Strategies Big Companies Use to Manage Massive MySQL Tables
Programmer XiaoFu
Programmer XiaoFu
Sep 26, 2024 · Backend Development

Boost Coding Efficiency with Guava RateLimiter: Elegant Rate Limiting Explained

This article explains how Guava's RateLimiter, built on the token‑bucket algorithm, provides smooth burst handling, configurable rates, warm‑up support, and thread safety, and demonstrates its usage through detailed code examples and best‑practice recommendations for API, database, and crawler throttling.

GuavaJavaRate Limiting
0 likes · 9 min read
Boost Coding Efficiency with Guava RateLimiter: Elegant Rate Limiting Explained
Programmer XiaoFu
Programmer XiaoFu
Sep 19, 2024 · Backend Development

Six Practical Rate‑Limiting Techniques for Microservices

The article walks through six concrete rate‑limiting methods—fixed window, sliding window, leaky bucket, token bucket (Guava RateLimiter), Sentinel middleware, and Spring Cloud Gateway—showing Java implementations, test results, advantages, drawbacks, and how they fit into microservice architectures.

GatewayGuavaJava
0 likes · 20 min read
Six Practical Rate‑Limiting Techniques for Microservices
Programmer XiaoFu
Programmer XiaoFu
Sep 12, 2024 · Backend Development

How Major Companies Implement Distributed Tracing with TraceIdFilter, MDC, and SkyWalking

The article explains how to solve interleaved multi‑thread logs in micro‑services by adding a X‑App‑Trace‑Id header, extracting it in a TraceIdFilter, storing it in SLF4J MDC, propagating it through Feign, adapting it for child threads, and finally integrating SkyWalking to print both application and SkyWalking trace IDs in Logback.

LogbackMDCSkyWalking
0 likes · 16 min read
How Major Companies Implement Distributed Tracing with TraceIdFilter, MDC, and SkyWalking
Programmer XiaoFu
Programmer XiaoFu
Sep 9, 2024 · Backend Development

Mastering Alibaba Sentinel: Flow Control, Degradation, and Cluster Management Guide

This comprehensive tutorial walks through Alibaba Sentinel's core concepts, installation, dashboard setup, microservice integration, flow‑control configurations, degradation strategies, hotspot parameter limiting, system‑adaptive rules, custom block handlers, whitelist/blacklist policies, rule persistence with Nacos, and cluster flow control for resilient Java backend services.

Circuit BreakingFlow ControlJava
0 likes · 38 min read
Mastering Alibaba Sentinel: Flow Control, Degradation, and Cluster Management Guide
Programmer XiaoFu
Programmer XiaoFu
Sep 2, 2024 · Backend Development

Designing a Dynamic Thread Pool for a Meituan Interview: Concepts and Implementation

The article explains what a dynamic thread pool is, why static pools are problematic, how to modify core parameters such as corePoolSize, maximumPoolSize, and workQueue at runtime, and provides code examples for monitoring, exposing metrics via Spring Boot Actuator, and integrating with Prometheus‑Grafana, while also listing open‑source implementations like Hippo4j and Dynamic TP.

Dynamic Thread PoolGrafanaJava
0 likes · 13 min read
Designing a Dynamic Thread Pool for a Meituan Interview: Concepts and Implementation
Programmer XiaoFu
Programmer XiaoFu
Aug 29, 2024 · Backend Development

Why @Transactional Often Fails: 13 Real‑World Pitfalls from 6 Years of Experience

This article analyses thirteen common mistakes that cause Spring's @Transactional annotation to be ineffective or not roll back, covering unnecessary usage, private/final/static methods, self‑invocation, wrong propagation settings, async threads, unmanaged beans, exception handling and more, with concrete code demos and solutions.

AOPJavaSpring
0 likes · 21 min read
Why @Transactional Often Fails: 13 Real‑World Pitfalls from 6 Years of Experience
Programmer XiaoFu
Programmer XiaoFu
Aug 28, 2024 · Backend Development

10 Powerful MyBatis SQL Patterns Used by Top Companies

This article presents ten practical MyBatis dynamic‑SQL techniques—including foreach, if, choose, selectKey, trim, and sql fragments—explaining their attributes, common pitfalls, and providing complete Java mapper and XML examples that help reduce boilerplate and avoid errors.

Dynamic SQLJavaMyBatis
0 likes · 21 min read
10 Powerful MyBatis SQL Patterns Used by Top Companies