Skip to main content
Posts

Posts

2025

JDK Tough Way - 7. JFR Event Collection Principles and Evolution

JDK Tough Way - 7. JFR Event Collection Principles and Evolution

·24771 words·117 mins
A comprehensive analysis of JFR (Java Flight Recorder) configuration system, usage methods, and event collection mechanisms. Covers JFR configuration system (global configuration, recording level configuration, JFC configuration files), multiple usage methods (JVM parameters, jcmd commands, JDK API, JMX), jfr tool analysis, event type classification and configuration applicability, as well as core changes and best practices from JDK 11 to JDK 25.
JDK Tough Way - 6. Practical Guide and Underlying Principles of Tracking Java Heap OOM with JFR

JDK Tough Way - 6. Practical Guide and Underlying Principles of Tracking Java Heap OOM with JFR

·4214 words·20 mins
In-depth guide on how to quickly locate Java heap OOM using JFR (JDK Flight Recorder) with practical methods and underlying principles, covering JFR event analysis for three typical OOM scenarios, including key events such as Allocation Requiring GC, ZAllocationStall, ObjectAllocationOutsideTLAB, and techniques for collecting and analyzing them.
A Brief Look at JEP - JEP-502: Stable Value (Preview)

A Brief Look at JEP - JEP-502: Stable Value (Preview)

·2181 words·5 mins
An exploration of JEP 502’s StableValue API, which addresses the fundamental trade-off between immutability and initialization flexibility in Java. This article covers the API design, core implementation details including double-checked locking patterns, memory semantics, and JIT optimization strategies using the @Stable annotation.
Comprehensive Guide to API Security and Anti-Bot Protection

Comprehensive Guide to API Security and Anti-Bot Protection

·1038 words·5 mins
An in-depth exploration of modern API security practices, covering key exchange mechanisms for web and mobile clients, essential security headers implementation, and effective anti-bot protection strategies to safeguard your applications while maintaining excellent user experience.
Why HeapDumpOnOutOfMemoryError Should Be Avoided in Production

Why HeapDumpOnOutOfMemoryError Should Be Avoided in Production

·702 words·4 mins
A comprehensive guide exploring why enabling HeapDumpOnOutOfMemoryError can cause significant performance issues in production environments, which OutOfMemoryError types actually trigger heap dumps, and better alternatives like JFR for memory leak detection and automatic service restart strategies.

2024

2023

JDK Tough Way - 4. The Most Detailed JVM Memory Structure Analysis

JDK Tough Way - 4. The Most Detailed JVM Memory Structure Analysis

·23344 words·110 mins
A comprehensive deep-dive into JVM memory architecture covering heap memory, metaspace, thread stacks, and compressed object pointers. This technical analysis examines memory allocation processes, Native Memory Tracking, and provides practical examples using tools like jol, jhsdb, and JFR for understanding JVM memory management internals.

2022

Tackling a Mysterious JVM Safepoint Issue: A Journey from Problem to Solution

Tackling a Mysterious JVM Safepoint Issue: A Journey from Problem to Solution

·1004 words·5 mins
A deep dive into diagnosing and resolving a production JVM issue where applications would freeze during hourly log synchronization tasks. We explore safepoint analysis, JVM log output blocking, asynchronous logging implementation, and WebFlux optimization to achieve a complete solution.
Solving JVM Safepoint Delays: A Journey from EFS Integration to Async Logging

Solving JVM Safepoint Delays: A Journey from EFS Integration to Async Logging

·970 words·5 mins
An in-depth investigation into mysterious JVM safepoint delays after upgrading to Java 17 and implementing centralized log collection with AWS EFS. We discovered how file I/O blocking during log output can freeze entire JVM processes and solved it using async logging and proper WebFlux implementation.
JDK Tough Way - 2. A Complete Guide to Java's PRNG Evolution

JDK Tough Way - 2. A Complete Guide to Java's PRNG Evolution

·4435 words·21 mins
A comprehensive exploration of pseudo-random number generators in Java, covering everything from basic Linear Congruential algorithms to advanced LXM implementations in Java 17. Learn about algorithm performance, security considerations, and how to choose the right random number generator for your specific use case.
MySQL Optimizer Statistics: Why Your Queries Choose the Wrong Index

MySQL Optimizer Statistics: Why Your Queries Choose the Wrong Index

·1600 words·8 mins
A deep dive into MySQL’s InnoDB optimizer statistics and how sampling inaccuracies can lead to poor index selection, causing dramatic performance differences between similar queries. Learn practical solutions to prevent slow SQL queries caused by optimizer misjudgments.
Configuring Spring Data Redis with Lettuce for Effective Pipeline Operations

Configuring Spring Data Redis with Lettuce for Effective Pipeline Operations

·1205 words·3 mins
A comprehensive guide on how to properly configure Spring Data Redis with Lettuce to enable pipeline functionality. Learn about connection sharing, AutoFlushCommands, and PipeliningFlushPolicy configurations to optimize your Redis batch operations and reduce network round-trip time.

2021

Spring Data Redis Connection Leak Mystery: When Your Microservice Goes Rogue

Spring Data Redis Connection Leak Mystery: When Your Microservice Goes Rogue

·1820 words·9 mins
A production incident investigation revealing how Spring Data Redis + Lettuce can leak connections when mixing SessionCallback and executeWithStickyConnection operations. Deep dive into connection management mechanisms, JFR analysis techniques, and practical solutions to prevent your Redis connection pool from becoming a black hole.