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
Aug 8, 2024 · Databases

Why Is MySQL Slow? Beyond Index Issues and Practical Fixes

The article walks through MySQL’s query execution flow, shows how to profile slow statements, explains index‑related pitfalls, connection‑pool limits, and InnoDB buffer‑pool sizing, and provides concrete commands and examples to diagnose and speed up sluggish queries.

EXPLAINIndex OptimizationInnoDB Buffer Pool
0 likes · 15 min read
Why Is MySQL Slow? Beyond Index Issues and Practical Fixes
Programmer XiaoFu
Programmer XiaoFu
Jul 30, 2024 · Fundamentals

Why Deleting or Adding Entries During a HashMap foreach Loop Triggers ConcurrentModificationException

The article explains why modifying a HashMap—by removing, adding, or putting entries—while iterating with a Java foreach loop causes a ConcurrentModificationException, demonstrates the underlying bytecode transformation, and shows how to safely perform such operations using an Iterator.

CollectionsConcurrentModificationExceptionHashMap
0 likes · 12 min read
Why Deleting or Adding Entries During a HashMap foreach Loop Triggers ConcurrentModificationException
Programmer XiaoFu
Programmer XiaoFu
Jul 24, 2024 · Backend Development

Root‑Cause Solutions for Kafka Message Duplicates

The article analyzes why Kafka messages are duplicated on both producer and consumer sides, explains at‑most‑once, at‑least‑once, and exactly‑once delivery semantics, and walks through three concrete remedies—idempotent producers, transactions, and consumer‑side deduplication—backed by configuration details, code samples, and practical deployment steps.

Consumer IdempotencyKafkaMessage Duplication
0 likes · 12 min read
Root‑Cause Solutions for Kafka Message Duplicates
Programmer XiaoFu
Programmer XiaoFu
Jul 18, 2024 · Backend Development

11 Proven Techniques to Boost API Performance by 100×

This article walks through eleven practical methods—such as adding proper indexes, optimizing SQL, parallelizing remote calls, eliminating duplicate queries, using async processing, shrinking transaction scope, refining lock granularity, applying pagination, leveraging caching layers, and employing sharding and monitoring tools—to dramatically improve backend interface performance.

API performanceIndex OptimizationSQL tuning
0 likes · 27 min read
11 Proven Techniques to Boost API Performance by 100×
Programmer XiaoFu
Programmer XiaoFu
Jul 10, 2024 · Backend Development

Why You Should Avoid Collectors.toMap in Java Streams

The article shows how using Collectors.toMap can trigger IllegalStateException for duplicate keys and NullPointerException for null values, and demonstrates proper merge functions, Optional handling, and a plain‑for‑loop alternative to safely convert a List of objects into a Map.

Collectors.toMapDuplicateKeysHashMap
0 likes · 5 min read
Why You Should Avoid Collectors.toMap in Java Streams
Programmer XiaoFu
Programmer XiaoFu
Jul 3, 2024 · Backend Development

Fast Large‑File Chunked Upload with Spring Boot and MinIO

This article walks through setting up MinIO, installing it via Docker on CentOS 7, configuring Spring Boot, and implementing chunked, instant‑resume, and resumable uploads for large files, complete with code examples, Docker commands, and troubleshooting tips.

Chunked UploadDockerJava
0 likes · 25 min read
Fast Large‑File Chunked Upload with Spring Boot and MinIO
Programmer XiaoFu
Programmer XiaoFu
Jun 27, 2024 · Backend Development

Choosing a Service Registry: In‑Depth Comparison of Zookeeper, Eureka, Nacos, Consul, and Etcd

This article explains the fundamental concepts of service registries, examines CAP theory and consensus protocols, and provides a detailed analysis of Zookeeper, Eureka, Nacos, Consul, and Etcd—including their architectures, features, trade‑offs, and practical guidance for selecting the most suitable registry for a given environment.

ConsulEtcdEureka
0 likes · 23 min read
Choosing a Service Registry: In‑Depth Comparison of Zookeeper, Eureka, Nacos, Consul, and Etcd
Programmer XiaoFu
Programmer XiaoFu
Jun 11, 2024 · Databases

10 Advanced MySQL Query Techniques Every Data Engineer Should Know

This article presents ten essential advanced MySQL concepts—including CTEs, recursive CTEs, temporary functions, CASE‑WHEN pivots, EXCEPT vs NOT IN, self‑joins, ranking window functions, delta calculations, running totals, and date‑time manipulation—each explained with clear examples and practical SQL snippets.

CASE WHENCTEMySQL
0 likes · 11 min read
10 Advanced MySQL Query Techniques Every Data Engineer Should Know
Programmer XiaoFu
Programmer XiaoFu
Jun 4, 2024 · Operations

How to Tackle a 900% CPU Spike in MySQL and Java Processes

The article walks through real interview scenarios where MySQL or Java processes consume 900% CPU, detailing step‑by‑step diagnosis with top, processlist, jstack, and concrete remediation such as adding indexes, using caches, fixing busy loops, and tuning memory.

GCIndexingJava
0 likes · 12 min read
How to Tackle a 900% CPU Spike in MySQL and Java Processes