Senior Tony
Author

Senior Tony

Former senior tech manager at Meituan, ex‑tech director at New Oriental, with experience at JD.com and Qunar; specializes in Java interview coaching and regularly shares hardcore technical content. Runs a video channel of the same name.

65
Articles
0
Likes
81
Views
0
Comments
Recent Articles

Latest from Senior Tony

65 recent articles
Senior Tony
Senior Tony
Jun 3, 2025 · Backend Development

How to Build a High‑Performance Short URL Service: Redirects, Generation Strategies, and Scaling

This article explains the core functions of a short‑URL system, compares permanent (301) and temporary (302) redirects, details four generation methods—including hash, auto‑increment, random strings, and pre‑generation—and outlines a high‑concurrency architecture with sharding, caching, and Snowflake IDs.

Snowflakehigh-concurrencyshorturl
0 likes · 9 min read
How to Build a High‑Performance Short URL Service: Redirects, Generation Strategies, and Scaling
Senior Tony
Senior Tony
May 29, 2025 · Operations

How to Diagnose and Fix 100% CPU on Database and Application Servers

This guide explains how to identify the root causes of a server's CPU hitting 100%—whether on a database or an application server—by using cloud monitoring, Linux top commands, thread analysis with jstack, and practical Java code fixes such as limiting loops, optimizing locks, and handling GC pressure.

CPU troubleshootingDatabase MonitoringJava
0 likes · 9 min read
How to Diagnose and Fix 100% CPU on Database and Application Servers
Senior Tony
Senior Tony
May 13, 2025 · Backend Development

Master WebSocket: From Handshake to Real‑Time Messaging with Java & Spring

This tutorial explains WebSocket’s full‑duplex protocol, compares it with HTTP polling, outlines typical real‑time use cases, details the handshake and frame structure, and provides complete client‑side JavaScript and Spring Boot server examples to help developers quickly implement bi‑directional communication.

JavaScriptProtocolReal-time communication
0 likes · 9 min read
Master WebSocket: From Handshake to Real‑Time Messaging with Java & Spring
Senior Tony
Senior Tony
Apr 24, 2025 · Databases

How to Effectively Monitor and Optimize Slow SQL in Real Projects

The article explains a systematic interview‑ready approach to handling slow SQL: collect queries via Druid, MySQL slow‑query log or cloud exporters, prioritize by total execution time, analyze EXPLAIN output (type, key, rows, filtered, extra), and apply index, FORCE INDEX, join‑order, or off‑loading techniques for optimization.

IndexesMySQLOptimization
0 likes · 9 min read
How to Effectively Monitor and Optimize Slow SQL in Real Projects
Senior Tony
Senior Tony
Apr 15, 2025 · Backend Development

How to Size Java Thread Pools: CPU vs I/O Strategies and Dynamic ThreadPool Solutions

This article explains two common approaches for configuring Java thread pools—static sizing based on CPU‑bound or I/O‑bound workloads and a formula‑driven method—then critiques their limits in real systems and introduces DynamicTp as a flexible, monitoring‑enabled alternative with code examples and architectural details.

CPU BoundDynamicThreadPoolI/O Bound
0 likes · 8 min read
How to Size Java Thread Pools: CPU vs I/O Strategies and Dynamic ThreadPool Solutions
Senior Tony
Senior Tony
Feb 1, 2025 · Backend Development

How to Eliminate Duplicate and Missed Messages in Kafka Consumers

This article explains Kafka's push/pull consumption models, the impact of enable.auto.commit and auto.commit.interval.ms on offset handling, and presents practical configurations and code patterns plus MySQL and Redis based deduplication techniques to prevent both duplicate and missing message processing.

Duplicate ConsumptionMessage Queueidempotency
0 likes · 8 min read
How to Eliminate Duplicate and Missed Messages in Kafka Consumers
Senior Tony
Senior Tony
Jan 13, 2025 · Backend Development

How Java’s AQS Powers ReentrantLock – A Deep Dive into the Source

This article explains the core concepts of Java’s AbstractQueuedSynchronizer (AQS), its exclusive and shared modes, the template‑method design it uses, and walks through the actual source code showing how ReentrantLock implements both fair and non‑fair locking, complete with diagrams and code snippets for interview preparation.

AQSJavaLock
0 likes · 10 min read
How Java’s AQS Powers ReentrantLock – A Deep Dive into the Source
Senior Tony
Senior Tony
Dec 30, 2024 · Databases

Unlocking MySQL InnoDB: Deep Dive into ACID, Redo/Undo Logs, and Double Write

This article explains MySQL InnoDB's ACID properties in depth, detailing how atomicity relies on Redo and Undo logs, how consistency ensures business logic integrity, how isolation uses locks and MVCC with snapshot and current reads, and how durability is achieved through Redo logs, the innodb_flush_log_at_trx_commit setting, and the Double Write mechanism.

ACIDInnoDBMySQL
0 likes · 11 min read
Unlocking MySQL InnoDB: Deep Dive into ACID, Redo/Undo Logs, and Double Write
Senior Tony
Senior Tony
Dec 6, 2024 · Databases

Why MySQL COUNT(*) Can Be Milliseconds Fast: Engine Tricks & Optimization Strategies

This article explains why COUNT(*) on a large InnoDB table can take seconds while MyISAM returns instantly, explores the underlying storage‑engine differences, and presents six practical techniques—including Redis counters, counting tables with transactions or triggers, parallel read threads, secondary indexes, and SHOW TABLE STATUS—to dramatically speed up row counting in MySQL.

COUNTInnoDBMySQL
0 likes · 9 min read
Why MySQL COUNT(*) Can Be Milliseconds Fast: Engine Tricks & Optimization Strategies