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

spring cloud nacos持久化实例配置健康检查配置是否可以通过配置文件配置 #12863

Closed
hasaiki123 opened this issue Nov 19, 2024 · 1 comment
Labels
area/Client Related to Nacos Client SDK kind/feature type/feature

Comments

@hasaiki123
Copy link

Is your feature request related to a problem? Please describe.
我正在使用spring cloud alibaba nacos,当我使用持久化实例时,我想使用http健康检查,但是我看网上资料是在web控制台对服务进行选择配置,如下:
image

然后我看到官方sdk有如下代码:
Cluster cluster = new Cluster();
cluster.setName("TEST5");
AbstractHealthChecker.Http healthChecker = new AbstractHealthChecker.Http();
healthChecker.setExpectedResponseCode(400);
healthChecker.setCurlHost("USer-Agent|Nacos");
healthChecker.setCurlPath("/xxx.html");
cluster.setHealthChecker(healthChecker);

我想知道的是,请问在使用spring cloud alibaba nacos时,是否可以通过配置文件设置持久化实例的健康检查方式为http,像spring cloud consul这样:
image
从而替代再去web console进行手动配置。

Describe the solution you'd like
A clear and concise description of what you want to happen.

使用spring cloud alibaba nacos时可以支持通过配置文件配置http健康检查。

@KomachiSion KomachiSion added kind/feature type/feature area/Client Related to Nacos Client SDK labels Nov 21, 2024
@KomachiSion
Copy link
Collaborator

Nacos 3.0有规划 maintainer client,类似现在client中的MaintainerNamingService。

另外Nacos3.0也有规划将健康检查和 服务类型解耦的功能。

至于希望通过spring cloud的配置来开启和设置, 建议提交issue到spring cloud alibaba 社区

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Client Related to Nacos Client SDK kind/feature type/feature
Projects
None yet
Development

No branches or pull requests

2 participants