Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdminServiceAddressLocator中的定时任务RefreshAdminServerAddressTask的delay时间可以动态调整 #5245

Open
youngzil opened this issue Oct 3, 2024 · 1 comment · May be fixed by #5248
Labels
feature request Categorizes issue as related to a new feature. help wanted

Comments

@youngzil
Copy link
Contributor

youngzil commented Oct 3, 2024

你的特性请求和某个问题有关吗?请描述

在我们做多AZ容灾演练时,发现 apollo-portal 不能正常服务(包括登录、OpenAPI接口等),通过后续排查发现是获取
在Portal中通过 /services/admin 获取的 adminServiceAddress 还存在异常的节点信息
code地址为:com.ctrip.framework.apollo.portal.component.RetryableRestTemplate#getAdminServices

Apollo-Portal 调用 Apollo-Admin的时候,是循环Admin的全部节点,直到调用成功
Apollo-Portal获取到Apollo-Admin已经被安全组隔离的节点地址,导致每次请求有都有概率需要先连接有问题的节点直到ConnectTimeoutException后再重试,导致HTTP RT增高,进而导致后续的HTTP的耗时增加

通过调整Eureka相关参数(配置文件可调整) 和 RefreshAdminServerAddressTask的执行时间,可以有效降低无效节点的淘汰时间

清晰简洁地描述一下你希望的解决方案

AdminServiceAddressLocator中有2个参数控制Task的执行时间

  private static final long NORMAL_REFRESH_INTERVAL = 5 * 60 * 1000;
  private static final long OFFLINE_REFRESH_INTERVAL = 10 * 1000;

目前这2个参数是无法调整的,希望可以放在系统参数中,能够通过配置的方式调整此值

清晰简洁地描述一下这个特性的备选方案

其它背景

BTW:如果觉得这个特性合理,我可以提交这个实现的代码

@nobodyiam nobodyiam added feature request Categorizes issue as related to a new feature. help wanted labels Oct 6, 2024
@nobodyiam
Copy link
Member

Sounds a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Categorizes issue as related to a new feature. help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants