You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hippo4j/docs/versioned_docs/version-1.4.3/user_docs/user_guide/frame.md

61 lines
3.3 KiB

Sync main branch (#920) * Tentative contributor update action * fix : supplement unit test for ThreadPoolManager (#805) * FIX Data truncation: Data too long for column 'tp_id' at row (#738) (#804) * add BeanUtilTest test case * add BeanUtilTest test case * add BeanUtilTest test case * add ClassUtilTest test case * add ConfigExecutorTest test case * Revert "add ConfigExecutorTest test case" This reverts commit ffc00ff4 * add ConfigExecutorTest test case * add EnvUtilTest test case * add ConfigExecutorTest test case * add Md5ConfigUtilTest test case * Revert "add Md5ConfigUtilTest test case" This reverts commit ee949adc * add Md5ConfigUtilTest test case * Revert "add Md5ConfigUtilTest test case" This reverts commit ed638916 * add Md5ConfigUtilTest test case * FIX Data truncation: Data too long for column 'tp_id' at row (#738) * FIX Data truncation: Data too long for column 'tp_id' at row (#738) * Mandatory to specify the ip+port registered by the client (#799) * Update using company * Front-end code update * Official document update * Released version 1.4.0 * Development of version 1.4.3 * Update README.md (#806) * Database table structure file adjustment * Optimize the H2 initialization logic (#807) * Added config mode springboot 1.x adaptation document * Fix the CheckStyle code format * JwtTokenManagerTest 补充测试用例 (#813) * Refactored thread pool monitoring (#816) * Refactor the server module (#817) * Refactor the server module (#817) * Hippo4j console ui migrated to this project (#818) * Query the Web thread pool list to add the framework logo (#819) * Fix the exception to timeout type alarm of lark (#820) * Add English README * Change of file format * Added container and tripartite framework thread pool monitoring (#816) * feat:Early method return (#823) * Dynamically registered thread pool queue capacity assignment error (#824) * Adjust thread pool build notification parameter priority (#825) * feat:The core thread must not be larger than the maximum thread. (#838) * organize the toolkit, add references and reference sources (#835) * fix : organize the toolkit, add references and reference sources * fix : add MemoryUtil for get memory info * fix : code format adjustment * Document update * Code optimization * docker-startup.sh的mysql配置多个“-”修复 (#840) * Lease.isExpired()方法判断过期时间去掉duration (#843) Co-authored-by: weizhangqing <weizhangqing@icloudshield.com> * Code optimization * Code optimization (#847) * feat:Long polling returns the appropriate status code (#848) * docker packaging issues fixed * default subscribe to the remote thread pool configuration. (#850) * feat:default subscribe to the remote thread pool configuration. * feat:default empty list * smart h2 storage path. (#857) * Add codecov * Add .codecov.yml * Update codecov * Supplemental code comments * Supplemental code comments (#860) * Add jacoco-maven-plugin * Update ci.yml * Update ci.yml * Update ci.yml * Skip the jacoco plugin by default * Add jacoco-maven-plugin (#861) * Supplemental code comments * Add jacoco-maven-plugin * Update ci.yml * Update ci.yml * Update ci.yml * Skip the jacoco plugin by default * Change shields icon * Change shields icon * Add LocalDataChangeEventTest * Add LocalDataChangeEventTest (#863) * Update README.md * Update README-EN.md * Add lombok (#867) * Add LocalDataChangeEventTest * Add lombok.config * Update lombok.config * After the dynamic thread pool is modified multiple times, the queue prompt information is lost (#868) * Official Documentation Update * Officially added internationalization function (#866) * Auto alerts (#872) * Simplified DynamicThreadPool usage * Simplified DynamicThreadPool usage * init * add Auto Alerts * The official website opens the multi-version function (#864) * refactor the function extension logic of DynamicThreadPoolExecutor (#815) (#854) * feat: Add a new thread-pool that supports the registration of callback interfaces * feat: Add plugins to support the default extensions of DynamicThreadPoolExecutor * refactor: Deprecate AbstractDynamicExecutorSupport and make DynamicThreadPoolExecutor extend ExtensibleThreadPoolExecutor (#815) * fix: obtained plugin list may cause thread-safe problems during iteration * refactor: Make DynamicThreadPoolExecutor support the selection of shutdown mode in destroy Co-authored-by: 马称 Ma Chen <machen@apache.org> * Format code (#873) * Simplified DynamicThreadPool usage * Simplified DynamicThreadPool usage * init * format code * Optimize code exception information * Increase unit test code coverage * feat:Alarm content (#877) * In version 1.4.3, the DingTalk alarm keyword was modified (#869) * Add registered company * test: Add unit test for DynamicThreadPoolExecutor and ExtensibleThreadPoolExecutor (#884) * refactor: Extract the logic about calculating task execution time to superclass (#879) (#882) * test: Add benchmark test for TaskTimeRecord (#885) * Update .codecov.yml * Field style refactoring and adding method logs (#878) * Adjust the conditions for nominating core developers * Client instance registration information code refactoring (#888) (#889) * Add method and field annotations (#890) * Supplementary Methods Notes (#891) * Add method and field annotations * Supplementary Methods Notes * Change the thread pool running data assignment * Change post log location * doc: Update developer (#893) * test: Add unit test about plugin manager (#892) * Update core developer list * revert Hippo4jBaseSendMessageService implement CommandLineRunner interface; (#895) notifyConfigs filed will not be init when use InitializingBean interface * Adapt to delayed loading (#886) * feat:Adapt to delayed loading * feat:Field Rename * Supplemental code comments (#898) * Server-side and client-side model of rpc mode call based on netty (#880) * fix : add toolkit * feat : Implement rpc calls through netty, implement server side and client side respectively, the underlying network connection and pipeline context mechanism depend on netty(#812) * fix : Modifying the comment Format (#812) * fix bug (#899) * test: add test for plugins (#896) * test: add test for plugins * test: Adjust the time precision of test cases * fix #901 (#902) * Supplemental code comments (#904) * Update .codecov.yml * Update .codecov.yml * Spring post processor logic refactoring (#874) (#905) * Format code (#906) * Update .codecov.yml * Format code (#907) * Add DynamicThreadPoolBannerHandlerTest (#908) * Update .codecov.yml * Code optimization and logic refactoring (#909) * Code optimization and logic refactoring * Code optimization and logic refactoring * Remove useless modules and refactor code * Remove kafka modules * Remove kafka code * Update basic project information * Refactor notification alerts and jar dependencies * Refactor notification alerts and jar dependencies (#911) * add new model hippo4j-rpc and Transfer rpc code to hippo4j-rpc (#912) * fix : add new model hippo4j-rpc (#812) * fix : fix : Transfer code to hippo4j-rpc (#812) * fix : Add set multiple ChannelHandler(#812) * fix : Code format modification * Update the front-end thread pool monitoring page * update hippo4j-rpc pom.xml, Change the value of the packaging t… (#913) * fix : update hippo4j-rpc pom.xml, Change the value of the packaging tag from pom to jar * fix : update hippo4j-rpc pom.xml, Change the value of the packaging tag from pom to jar * Support automatic registration of plugins and plugin registrars (#914) * feat: Support to centralized management of all plugins * feat: Support automatic registration of plugins and plugin registrars * Task execution timeout time assignment * Refactor dynamic thread pool registration variable naming * Enable Update Contributor action * Update pom.xml * Update the list of contributors (#917) Co-authored-by: hippo4jbot[bot] <wechat202110@163.com> * Update the list of contributors (#916) Co-authored-by: hippo4jbot[bot] <wechat202110@163.com> * Refactor official documentation * Update team page * Stop running status collection when the project is closed gracefully (#918) * Update official website documents * Released version 1.4.3 Co-authored-by: pizihao <48643103+pizihao@users.noreply.github.com> Co-authored-by: Gdk666 <763366136@qq.com> Co-authored-by: shanjianq <49084314+shanjianq@users.noreply.github.com> Co-authored-by: zoujin001 <45163196+zoujin001@users.noreply.github.com> Co-authored-by: WuLang <48200100+wulangcode@users.noreply.github.com> Co-authored-by: Malcolm <33982485+Malcolmli@users.noreply.github.com> Co-authored-by: jirong <42790011+w-jirong@users.noreply.github.com> Co-authored-by: weizhangqing <weizhangqing@icloudshield.com> Co-authored-by: 王杰 <345127857@qq.com> Co-authored-by: weihubeats <weihubeats@163.com> Co-authored-by: 黄成兴 <49221670+Createsequence@users.noreply.github.com> Co-authored-by: baymax55 <35788491+baymax55@users.noreply.github.com> Co-authored-by: maxisvest <1447829379@qq.com> Co-authored-by: hippo4jbot[bot] <wechat202110@163.com>
2 years ago
---
sidebar_position: 1
---
# 为什么写
[美团线程池文章](https://tech.meituan.com/2020/04/02/java-pooling-pratice-in-meituan.html "美团线程池文章") 介绍中,因为业务对线程池参数没有合理配置,触发过几起生产事故,进而引发了一系列思考。最终决定封装线程池动态参数调整,扩展线程池监控以及消息报警等功能。
在开源平台找了挺多动态线程池项目,从功能性以及健壮性而言,个人感觉不满足企业级应用。
因为对动态线程池比较感兴趣,加上想写一个有意义的项目,所以决定自己来造一个轻量级的轮子。
想给项目起一个简单易记的名字,类似于 Eureka、Nacos、Redis后和朋友商量决定命名**Hippo4J**。
![](https://images-machen.oss-cn-beijing.aliyuncs.com/动态线程池功能架构-1.jpg)
## 它解决了什么问题
线程池在业务系统应该都有使用到,帮助业务流程提升效率以及管理线程,多数场景应用于大量的异步任务处理。
虽然线程池提供了我们许多便利,但也并非尽善尽美,比如下面这些问题就无法很好解决。
- 线程池随便定义,线程资源过多,造成服务器高负载。
- 线程池参数不易评估,随着业务的并发提升,业务面临出现故障的风险。
- 线程池任务执行时间超过平均执行周期,开发人员无法感知。
- 线程池任务堆积,触发拒绝策略,影响既有业务正常运行。
- 当业务出现超时、熔断等问题时,因为没有监控,无法确定是不是线程池引起。
- 原生线程池不支持运行时变量的传递,比如 MDC 上下文遇到线程池就 GG。
- 无法执行优雅关闭,当项目关闭时,大量正在运行的线程池任务被丢弃。
- 线程池运行中,任务执行停止,怀疑发生死锁或执行耗时操作,但是无从下手。
Hippo4J 很好解决了这些问题,它将业务中所有线程池统一管理,增强原生线程池系列功能。
## 它有什么特性
应用系统中线程池并不容易管理。参考美团的设计Hippo4J 按照租户、项目、线程池的维度划分。再加上系统权限,让不同的开发、管理人员负责自己系统的线程池操作。
举个例子,小编在一家公司的公共组件团队,团队中负责消息、短链接网关等项目。公共组件是租户,消息或短链接就是项目。
Hippo4J 除去动态修改线程池,还包含实时查看线程池运行时指标、负载报警、配置日志管理等。
- `hippo4j-adapter`:适配对第三方框架中的线程池进行监控,如 Dubbo、RocketMQ、Hystrix 等;
- `hippo4j-auth`:用户、角色、权限等;
- `hippo4j-common`:多个模块公用代码实现;
- `hippo4j-config`:提供线程池准实时参数更新功能;
- `hippo4j-console`:对接前端控制台;
- `hippo4j-core`:核心的依赖,包括配置、核心包装类等;
- `hippo4j-discovery`:提供线程池项目实例注册、续约、下线等功能;
- `hippo4j-example` :示例工程;
- `hippo4j-message` :配置变更以及报警通知发送;
- `hippo4j-monitor` :线程池运行时监控;
- `hippo4j-server` Server 端发布需要的模块聚合;
- `hippo4j-spring-boot`SpringBoot Starter。