apache / apache/servicecomb-java-chassis
[FEATURE] - Add random time to the scheduled task for pulling instances from serviceCenter.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
### Problem this feature would solve
servicecomb引擎注册中心会定期1小时清楚本地实例缓存,在请求缓存后,客户端请求需要从etcd中获取实例数据,导致响应时延增加,这样导致原本请求时间错开的请求慢慢的步调一致,从而引发高并发请求服务端获取实例接口,触发限流异常。
### Describe the solution
客户端定时更新本地实例缓存时,休眠时间增加随机数,以达到请求服务端的时间是错开的,避免大量服务同步调用注册中心,触发限流异常。
### Alternatives considered
_No response_
### Additional Context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is named. Start by locating the scheduled task that refreshes the local instance cache from serviceCenter, then trace its etcd fallback and existing scheduling tests if present. Done means refresh requests include a random delay so clients do not synchronize and trigger registry rate limiting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100