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

apollo-client容器化场景的客户端可靠性 #3506

Open
GuiSong01 opened this issue Jan 20, 2021 · 7 comments
Open

apollo-client容器化场景的客户端可靠性 #3506

GuiSong01 opened this issue Jan 20, 2021 · 7 comments
Labels
area/client apollo-client area/kubernetes feature request Categorizes issue as related to a new feature.

Comments

@GuiSong01
Copy link

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

apollo-client提供的客户端可靠性是把配置缓存到文件,但是现在大多数场景都是容器化场景,服务可以在虚拟机上漂移,因此,缓存到文件不满足apollo服务端故障后,apollo-client服务重启、漂移的可靠性诉求。

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

我们目前采用的方案是改造了apollo-client,如果配置了apiserver地址和service account token,则apollo-client会把配置缓存到configMap去,这样就算apollo服务端故障,业务容器化实例重启或者漂移后,都能从configmap拉取到配置。

可以看一下这个特性可以合入开源社区吗

@Anilople Anilople added area/client apollo-client area/kubernetes feature request Categorizes issue as related to a new feature. labels Jan 20, 2021
@nobodyiam
Copy link
Member

欢迎提交 PR!

希望能借此机会把本地缓存这一层抽象出来,可以灵活支持本地文件、config map、本地 cache 等多种场景。
目前 apollo-client 的ConfigRepository是可以支持多种配置源实现的,不过在代码层面可能还要做一些重构,比如DefaultConfigFactory

@hueidou
Copy link

hueidou commented Oct 27, 2021

期望添加这个特性,有后续吗?

@wcp1231
Copy link

wcp1231 commented Sep 23, 2022

如果配置了apiserver地址和service account token,则apollo-client会把配置缓存到configMap去

这个意思是由 client 去写 configMap 吗?

我的想法是由外部系统,比如 apollo-admin 或者别的服务将应用服务的配置写到 configMap 里。
应用服务的 deployment 里默认挂载自己的 configMap 到某个目录,apollo-client 到这个目录读取

这样 apollo-client 的职责比较简单,还是和原来的功能一样。
写 configMap 的逻辑是新增的,在服务端实现就行

@Shelby-Jiao
Copy link

need it as well!

@hezhangjian
Copy link
Member

I think I can work on this

@24kpure
Copy link

24kpure commented Oct 29, 2024

I think I can work on this

Any progress? @shoothzj

@hezhangjian
Copy link
Member

@24kpure Thanks for your attention, I think we are close. You can take a look at apolloconfig/apollo-java#79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client apollo-client area/kubernetes feature request Categorizes issue as related to a new feature.
Projects
None yet
Development

No branches or pull requests

8 participants