apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.18k stars 10.21k forks source link

客户端启动阶段能否考虑并行获取配置集 #5196

Closed whitefeather2018 closed 1 month ago

whitefeather2018 commented 3 months ago

描述bug

简洁明了地描述一下bug

ApolloApplicationContextInitializer在启动阶段遍历Apollo

ApolloApplicationContextInitializer在启动阶段遍历Apollo.bootstrap.namespaces列表中的配置集,串行进行配置集获取,想问一下为什么考虑串行而不是并行。目前碰到的问题是在配置集比较多的场景下,如果配置中心服务出问题,客服端会由于启动阶段配置获取失败而导致重试(重试存在时间间隔),又因为是串行的,综合导致了启动时间过长。

复现

通过如下步骤可以复现:

  1. 将apollo.meta参数配置为错误值,模拟启动阶段连不上服务端
  2. 在apollo.bootstrap.namespaces中配置多个配置集
  3. 本地没有缓存文件

期望 希望可以并行进行配置集获取。(但是并行获取配置集不确定会不会有其他副作用)

简介明了地描述你希望正常情况下应该发生什么

截图

如果可以,附上截图来描述你的问题

额外的细节和日志

nobodyiam commented 3 months ago

有一个 PR 尝试提升配置获取速度可以参考下 - https://github.com/apolloconfig/apollo-java/pull/64

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 1 month ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.