Stargazers Over Time | Contributors Over Time |
---|---|
GitHub: opengoofy/hippo4j
Gitee: opengoofy/hippo4j
For full documentation & more details, visit: Docs
Thread pool is a tool for managing threads based on the idea of pooling. Using thread pool can reduce the cost of creating and destroying threads and avoid exhaustion of system resources caused by too many threads. In high-concurrency and large-volume task processing scenarios, the use of thread pools is essential.
If you actually use the thread pool in your project, I believe you may encounter the following pain points:
The thread pool is arbitrarily defined and there are too many thread resources, causing high load on the server.
Thread pool parameters are difficult to evaluate. As business concurrency increases, the business faces the risk of failure.
The thread pool task execution time exceeds the average execution cycle and is invisible to developers.
The accumulation of thread pool tasks triggers the rejection policy and affects the normal operation of existing businesses.
When problems such as timeouts and circuit breakers occur in the business, because there is no monitoring, it is impossible to determine whether the problem is caused by the thread pool.
The native thread pool does not support the transfer of runtime variables. For example, the MDC context will GG when it encounters the thread pool.
Unable to perform graceful shutdown, a large number of running thread pool tasks were discarded when the project was shut down.
While the thread pool is running, task execution stops. It is suspected that a deadlock has occurred or a time-consuming operation has been performed, but there is no way to start.
Provides support for the following functions:
Global Control - Manage application thread pool instances.
Dynamic changes - dynamically change thread pool parameters while the application is running, including but not limited to: cores, maximum number of threads, blocking queue capacity, rejection policy, etc.
Notification alarm - built-in four alarm notification strategies, thread pool activity, capacity water level, rejection strategy and task execution time is too long.
Data collection - supports multiple methods to collect thread pool data, including but not limited to: logs, built-in collection, Prometheus, InfluxDB, ElasticSearch, etc.
Run monitoring - View the thread pool runtime data in real time, and display the thread pool runtime data in charts within a customized time.
Function expansion - supports thread pool task delivery context; when the project is closed, supports waiting for the thread pool to complete the task within a specified time.
Multiple modes - Two built-in usage modes: dependency on configuration center and no middleware dependency.
Container management - Tomcat, Jetty, Undertow container thread pool runtime viewing and thread number changes.
Framework adaptation - Dubbo, Hystrix, RabbitMQ, RocketMQ and other consumer thread pool runtime data viewing and thread number changes.
Change review - Provides a variety of user roles. Changes in thread pool parameters by ordinary users require Admin user review before they can take effect.
Dynamic plug-ins - built-in multiple thread pool plug-ins, supporting user-defined plug-ins and runtime extensions.
Multi-version adaptation - After actual testing, client SpringBoot 1.5.x => 2.7.5 version has been supported (higher versions have not been tested).
For local demonstration purposes, see Quick start
Demo environment: http://console.hippo4j.cn/index.html
More connected companies are welcome to register at the registration address. Registration is only for product promotion.
Open source is not easy, click the Star in the upper right corner to encourage it!
If you want to follow Hippo4j’s updated articles and shared information in real time, you can follow my official account.
If you have any questions during use, or have any suggestions for the project, follow the official account and reply: Join the group to communicate and discuss with 1000+
like-minded friends.
If your company does not use Hippo4j scenarios, I also recommend reading the underlying principles of the project, mainly for the following reasons:
In order to improve code quality and subsequent expansion behavior, multiple design patterns are used to achieve high cohesion and low coupling.
The bottom layer of the framework relies on the Spring framework to run, and uses a large number of Spring-related functions in the source code.
Use a variety of tools under the JUC concurrency package to ensure the safety of multi-threaded operations, and understand concurrent programming through actual scenarios.
Learn from the mainstream open source frameworks Nacos and Eureka to implement lightweight configuration center and registration center functions.
Customize the RPC framework implementation and encapsulate Netty to complete client/server network communication optimization.
Standardize code writing through plug-ins such as CheckStyle and Spotless to ensure high-quality code behavior and code style.
[Sa-Token]: A lightweight java authority authentication framework that makes authentication simple and elegant!
[HertzBeat]: Easy-to-use and friendly cloud monitoring system, no Agent required, powerful custom monitoring capabilities.
[JavaGuide]: A guide covering the core knowledge that most Java programmers need to master.
[ toBeBetterJavaer ]: An easy-to-understand, humorous Java learning guide.
[Jpom]: Simple and lightweight low-intrusive online construction, automatic deployment, daily operation and maintenance, and project monitoring software.
[12306]: Complete high-imitation 12306 user + ticket grabbing + order + payment service to help students focus on employment projects.
[CongoMall]: Enterprise-level mall, developed based on DDD domain-driven model, including mall business and infrastructure.
Thanks to all developers who contributed to the project. If you are interested in contributing, please refer to the good first issue.
The Hippo4j community has received multiple licenses from Jetbrains and has assigned active developers to the project. We are very grateful to Jetbrains for its support of the open source community.