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

配置发布之后,有的客户端读取不到最新的配置 #5313

Open
Jerrywgl opened this issue Jan 16, 2025 · 3 comments
Open

配置发布之后,有的客户端读取不到最新的配置 #5313

Jerrywgl opened this issue Jan 16, 2025 · 3 comments

Comments

@Jerrywgl
Copy link

描述bug

配置发布之后,有的客户端读取不到最新的配置

复现
暂时没有找到稳定复现的发版,但是已经出现好多次了。

期望
能帮忙找出可能得原因,以及解决办法

截图

Clipboard_Screenshot_1737028757

额外的细节和日志

  • 版本:2.1.0

  • 平台和操作系统 linux

Copy link

dosubot bot commented Jan 16, 2025

I found a similar unsolved discussion regarding clients not receiving the latest configuration updates in Apollo: apollo热部署数据更新失败请教, which was last updated on December 19, 2023 [1].

Here are some potential reasons why a client might not receive the latest configuration in Apollo:

  1. Config Service Unavailability: If all Config Services are offline, the client cannot read the latest configuration. However, the client can still use the local cache configuration file if it restarts.

  2. Notification Failure: The client relies on the Config Service to notify it of configuration changes. If the notification mechanism fails, the client might not be aware of the latest configuration changes. The client uses HTTP long polling to maintain a connection with the Config Service for real-time updates. If this connection is disrupted, the client might not receive timely updates.

  3. Database Issues: If the database is down, the Portal cannot update the configuration, but the client is not directly affected in terms of reading configurations due to the configuration cache enabled in the Config Service.

  4. Network Issues: Network issues between the client and the Config Service can prevent the client from receiving updates.

  5. Configuration Cache: The client periodically pulls the latest configuration as a fallback mechanism. If this periodic pull fails or is delayed, the client might not have the latest configuration [2].

These are some areas you might want to investigate to identify the root cause of the issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@BlackBear2003
Copy link
Member

哈喽,请问这个读不到最新配置的问题是暂时的还是会持续很长一段时间呢?

如果是暂时读不到最新配置,那很可能是正常现象,apollo的 配置发布推送给客户端 是异步进行的:
https://www.apolloconfig.com/#/zh/design/apollo-design?id=_21-%e9%85%8d%e7%bd%ae%e5%8f%91%e5%b8%83%e5%90%8e%e7%9a%84%e5%ae%9e%e6%97%b6%e6%8e%a8%e9%80%81%e8%ae%be%e8%ae%a1

  1. 用户在Portal操作配置发布
  2. Portal调用Admin Service的接口操作发布
  3. Admin Service发布配置后,发送ReleaseMessage给各个Config Service
  4. Config Service收到ReleaseMessage后,通知对应的客户端

这边没有做强一致性(线性一致性)保证,因此部分client读取到旧配置是正常现象,其对应的ConfigService还没有收到ReleaseMessage

@Jerrywgl
Copy link
Author

时间比较长了,起码是小时级别了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants