当前位置:网站首页>唐太宗把微服务的“心跳机制”玩到了极致!
唐太宗把微服务的“心跳机制”玩到了极致!
2022-06-21 23:12:00 【InfoQ】


- ① 谁发送的心跳请求?
- ② 多久发送一次?
- ③ 如何发送的?
- ④ 如何接收心跳请求的?
- ⑤ 接收后做了什么事情?
谁发送的心跳请求

多久发送一次


- maximumPoolSize:最大线程数。线程池允许创建的最大线程数。
- corePoolSize:核心线程数。当提交一个任务到线程池时,线程池会创建一个线程来执行任务,即使其他空闲的核心线程能够执行新任务也会创建线程,等到 需要执行的任务数大于线程池基本大小时就不再创建。如果调用了线程池的 prestartAllCoreThreads() 方法,则线程池会提前创建并启动所有基本线程。
- keepAliveTime:线程活动保持时间 ,线程池的工作线程空闲后,保持存活的时间。
- runnableTaskQueue:任务队列,用于保存等待执行的任务的阻塞队列。有四种:ArrayBlockingQueue、LinkedBlockingQueue、SynchronousQueue、PriorityBlockingQueue。

如何发送心跳请求的?

eurekaTransport.registrationClient.sendHeartBeat(
instanceInfo.getAppName(),
instanceInfo.getId(),
instanceInfo,
null);
http://localhost:8080/v2/apps/order/i-000000-1
如何接收心跳请求的?
ApplicationsResource->ApplicationResource->InstanceResource
接收后做了什么事情
最后更新时间public void renew() {
lastUpdateTimestamp = System.currentTimeMillis() + duration;
}

边栏推荐
- The tangled truth about NFT and copyright
- kubernetes code-generator使用
- [next] the component definition is missing display name in the next JS package
- 以父之名活动攻略(可以薅羊毛啦)
- 再次认识 WebAssembly
- 【next】nextjs打包后出现passHref is missing
- 【微信小程序】40029 invalid code解决办法集合
- Get the value value according to the key in the data
- [Yugong series] general responsibility allocation principle in June 2022 (IX) - principle of protected variables
- 火线沙龙第26期-多云安全专场
猜你喜欢

If a programmer goes to prison, will he be assigned to write code?

【next】nextjs打包后出现passHref is missing

再次认识 WebAssembly

JVM makes wheels

【yarn】Name contains illegal characters
![[next] the component definition is missing display name in the next JS package](/img/19/2da1ea19987959f8636aa1dbbaae26.png)
[next] the component definition is missing display name in the next JS package

Oracle flashback and RMAN samples

American tourist visa interview instructions, let me focus!
![[roarctf2019] gold 6 years](/img/c4/07caf5dc8f27f77b724753b5f87a0a.png)
[roarctf2019] gold 6 years

Buuctf misc spy Apocalypse
随机推荐
Get the value value according to the key in the data
AttributeError: ‘WebDriver‘ object has no attribute ‘w3c‘
pytorch 界面编程相关
The minimum non composable sum of arrays
从云鲸率先布局上门服务,看其如何用服务冲破行业“封锁线”
Recruitment brochure for traditional product manager international qualification certification (NPDP) in the second half of 2022
rabbit:do_ run_ postlaunch_ phase/0 line 932
[Yugong series] general responsibility allocation principle in June 2022 (IX) - principle of protected variables
以父之名活动攻略(可以薅羊毛啦)
Xshell连接虚拟机只能输入public key解决方案【亲测】
IDA静态逆向分析工具使用详解
关于一次Web线下面试的思考
[GXYCTF2019]SXMgdGhpcyBiYXNlPw==
微服务测试效率治理
编写自己的kubernetes controller
Brief idea and simple case of JVM tuning - space allocation guarantee mechanism in the old age
You have a chance, here is a stage
[pwn basics]pwntools learning
Win10 uses the user's initial password and fails to connect to the win server
Mathematical knowledge: greatest common divisor divisor