NiuNiu MaTe
Author

NiuNiu MaTe

Joined Tencent (nicknamed "Goose Factory") through campus recruitment at a second‑tier university. Career path: Tencent → foreign firm → ByteDance → Tencent. Started as an interviewer at the foreign firm and hopes to help others.

97
Articles
0
Likes
79
Views
0
Comments
Recent Articles

Latest from NiuNiu MaTe

97 recent articles
NiuNiu MaTe
NiuNiu MaTe
Sep 22, 2025 · Big Data

How to De‑duplicate 4 Billion QQ Numbers with Only 1 GB RAM

Learn four practical techniques—simple sorting, hashmap deduplication, external merge sort, and bitmap bit‑set optimization—to efficiently remove duplicate QQ numbers from a 40‑billion‑record file while staying within a strict 1 GB memory limit, even handling tighter 100 MB constraints.

BitmapDeduplicationalgorithm
0 likes · 9 min read
How to De‑duplicate 4 Billion QQ Numbers with Only 1 GB RAM
NiuNiu MaTe
NiuNiu MaTe
Sep 17, 2025 · Databases

Why MySQL Indexes Fail and How to Fix Them: 12 Common Scenarios

This article explains the core purpose of MySQL indexes, enumerates twelve typical situations that cause index failure, provides concrete SQL examples and corrections, and shows how to use EXPLAIN to diagnose and verify index usage for better query performance.

Database PerformanceEXPLAINIndex Optimization
0 likes · 16 min read
Why MySQL Indexes Fail and How to Fix Them: 12 Common Scenarios
NiuNiu MaTe
NiuNiu MaTe
Sep 12, 2025 · Backend Development

Mastering QPS: From Basics to Real‑World Interview Wins

This article explains what QPS (queries per second) really means, distinguishes it from TPS and concurrency, shows typical QPS ranges for different systems, and provides practical methods—production monitoring, APM tools, custom metrics, load‑testing and manual estimation—to obtain, validate, and interpret QPS for performance optimization and interview success.

Interview preparationPerformance MonitoringQPS
0 likes · 22 min read
Mastering QPS: From Basics to Real‑World Interview Wins
NiuNiu MaTe
NiuNiu MaTe
Sep 10, 2025 · Backend Development

How to Quickly Resolve Message Queue Backlog and Keep Your System Stable

This article explains what message queue backlog is, why it harms system latency, and provides practical, step‑by‑step strategies—including temporary consumer scaling, prioritizing core messages, queue splitting, root‑cause analysis, performance tuning, message design, dead‑letter handling, traffic control, capacity planning, and monitoring—to eliminate backlog and ensure reliable asynchronous processing.

BacklogDead Letter QueueMessage Queue
0 likes · 21 min read
How to Quickly Resolve Message Queue Backlog and Keep Your System Stable
NiuNiu MaTe
NiuNiu MaTe
Sep 8, 2025 · Backend Development

How to Auto‑Close Expired E‑Commerce Orders: Timers, Queues & Redis Time Wheels

Learn how to design and implement automatic order expiration in e‑commerce systems using three approaches—simple scheduled table scans, delayed message queues, and a Redis time‑wheel—detailing their trade‑offs, code examples, indexing tips, distributed locking, and failure‑handling strategies.

Message Queuebackend designe-commerce
0 likes · 16 min read
How to Auto‑Close Expired E‑Commerce Orders: Timers, Queues & Redis Time Wheels
NiuNiu MaTe
NiuNiu MaTe
Sep 4, 2025 · Operations

Mastering Multi‑Active Distributed Systems: From Single Server to Global Fault Tolerance

This article walks developers through the evolution of distributed system architectures—from single‑machine deployments to master‑slave, same‑city active‑active, and finally true multi‑active setups—explaining core concepts, replication strategies, conflict resolution, fault detection, switch mechanisms, recovery methods, and interview tips for high‑availability design.

CAP theoremInterview preparationdata replication
0 likes · 26 min read
Mastering Multi‑Active Distributed Systems: From Single Server to Global Fault Tolerance
NiuNiu MaTe
NiuNiu MaTe
Sep 1, 2025 · Backend Development

How Does Java’s HashMap Resolve Hash Collisions? From Linked Lists to Red‑Black Trees

Java’s HashMap tackles hash collisions through a combination of perturbation functions, chaining, open addressing, and, since JDK 8, converting long chains into red‑black trees, with detailed explanations of the underlying algorithms, resizing mechanics, threshold choices, and performance trade‑offs for developers and interview candidates.

Hash CollisionHashMapJava
0 likes · 17 min read
How Does Java’s HashMap Resolve Hash Collisions? From Linked Lists to Red‑Black Trees
NiuNiu MaTe
NiuNiu MaTe
May 17, 2023 · Databases

Mastering Redis HSET: Basics, Commands, and Internal Encoding

This article introduces Redis HSET, covering its definition, suitable use cases, common commands for creating, reading, updating, and deleting hash fields, as well as the underlying encoding mechanisms (ziplist vs hashtable) and best practices, including the deprecation of HMSET.

CacheHSETHash
0 likes · 7 min read
Mastering Redis HSET: Basics, Commands, and Internal Encoding
NiuNiu MaTe
NiuNiu MaTe
Apr 11, 2023 · Databases

Mastering Redis Sets: From Basics to Advanced Operations

This article introduces Redis Sets as unordered unique string collections, explains their ideal use cases, and provides detailed walkthroughs of creation, query, update, and deletion commands—including SADD, SREM, SISMEMBER, SCARD, SMEMBERS, SSCAN, SINTER, SUNION, and SDIFF—along with underlying encoding mechanisms.

Data StructuresRedisSet
0 likes · 8 min read
Mastering Redis Sets: From Basics to Advanced Operations