[Open Source] A Lightweight Local Hot-Spot Detection and Degradation Framework for High-Traffic Scenarios
![[Open Source] A Lightweight Local Hot-Spot Detection and Degradation Framework for High-Traffic Scenarios](https://yy123.ink/api/img/1782593457906-wv8xro.jpg)
1. Project Overview

Akali is a lightweight, locally deployed hot-spot detection and degradation framework designed for high-traffic scenarios. It easily handles situations such as concurrent queries under extremely high traffic. Integration and usage are incredibly simple, allowing you to get started in just 10 seconds!
The philosophy behind the Akali framework is to be compact and practical, appearing and disappearing without a trace. It enters team fights with barely any health and leaves at full health, leaving nothing behind wherever it goes.
2. Open Source License
Licensed under Apache-2.0
3. Screenshots

4. Feature Overview
Features
Hot-Spot Detection
Automatically detects hot spots locally based on QPS or thread count.
Hot-Spot Handling
Automatically returns cached hot-spot data and removes it when the hot spot disappears.
Degradation Detection
Automatically detects whether degradation is needed based on QPS or thread count.
Degradation Handling
Allows degradation methods to be defined based on method names.
Lightweight and Compact
The entire framework consists of fewer than 500 lines of code and has minimal system overhead.
Quick Integration
The entire framework requires only two annotations. Simply add the annotations to start using it.
5. Tech Stack

Hot-Spot Cache Updates
If a method parameter is identified as a hot spot, cached hot-spot data will be returned for one minute. After one minute, if the hot spot still exists, a second hot-spot event will be triggered. During this second event, your data will be queried again and cached. This cached data will then be returned throughout the second minute. The process continues in the same way.Therefore, make sure your API guarantees idempotency within a short time window. Akali is not suitable if your API returns data that changes constantly. This is very important.
RPC Framework Support
Supports any RPC framework, including hot-spot handling on the provider side of Dubbo and OpenFeign. You can simply place the@AkaliHotannotation on the provider side of the frameworks mentioned above, either on interface methods or implementation class methods.
Recommendations for Hot-Spot Handling
Whenever possible, apply the annotation to methods that are idempotent within a certain time window, such as user queries and order queries. These methods are relatively idempotent within a short time window.
If you apply the annotation to transactional methods, such as inventory deductions, triggering a hot spot may cause business logic inconsistencies because these operations are inherently non-idempotent.
Therefore, carefully evaluate your business requirements before using this framework. Do not use it blindly. Such issues result from improper usage, not from the framework itself.
Source: Akali Official Documentation