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

nacos client config api refactor #12734

Open
shiyiyue1102 opened this issue Oct 14, 2024 · 0 comments
Open

nacos client config api refactor #12734

shiyiyue1102 opened this issue Oct 14, 2024 · 0 comments

Comments

@shiyiyue1102
Copy link
Collaborator

shiyiyue1102 commented Oct 14, 2024

Is your feature request related to a problem? Please describe.

  1. publish config for cas should calculate expect config md5, but a encryped config can't be accquired by getConfig, cas publish is not avalivable for encrytped config.
  2. nacos client has serval publish config override method,when we need add a parameter, we need create a new one, not frendly for extension.
  3. current publish config method only return true or false, client can't get detailed fail reason,such as 403,503 or cas fail etc. we should provide more detailed result from client and the same goes for get config method.
  4. some users may invoke get config method to business request logic which may result in get config request storm to add pressure to server side, we need to design a meconism to avoid this scene.

Describe the solution you'd like
1.create new method like GetConfigResult getConfig(GetConfigRequest request), PublishConfigResult publishConfig(PublishConfigRequest request),RemoveConfigResult removeConfig(RemoveConfigRequest request) for extensionality.
2.use this two new methods to refactor current serval override method
3.GetConfigResult should return casMd5 for PublishConfigRequet#setCasMd5 to encryped config cas publish.
4. getConfig may get local content and md5 in CacheData or local snapshot dir, add a localMd5 to get config request, and compare client side md5 to server local matched md5 on server side , return 304 when equals, so server may not read content from disk and not return content to response to reduce cpu and io.

@shiyiyue1102 shiyiyue1102 changed the title nacos client nacos client config api Oct 14, 2024
@shiyiyue1102 shiyiyue1102 changed the title nacos client config api nacos client config api refactor Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants