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

grpc polaris 无损下线 #49

Open
stan9333 opened this issue Jun 6, 2023 · 3 comments
Open

grpc polaris 无损下线 #49

stan9333 opened this issue Jun 6, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@stan9333
Copy link
Contributor

stan9333 commented Jun 6, 2023

我们部门有一套k8s服务、然后grpc服务下线的时候不是用的jvm hook来通知注册中心嘛。就会造成下线不稳定、有时候不能主动下线成功。

@stan9333 stan9333 added the enhancement New feature or request label Jun 6, 2023
@chuntaojun chuntaojun self-assigned this Jun 6, 2023
@beretaa
Copy link

beretaa commented Jun 29, 2023

做个ApplicationListener, 手动反注册,然后sleep阻塞一段时间,实现延迟下线,
k8s要配置terminationGracePeriodSeconds
PolarisAutoServiceRegistration polarisAutoServiceRegistration = SpringContextHolder.getApplicationContext().getBean(PolarisAutoServiceRegistration.class);
polarisAutoServiceRegistration.stop();
Thread.sleep(10000);

@chuntaojun
Copy link
Member

后续会在 polaris-java 提供标准的无损上下线 API 设计,暂时先移到 grpc-java-polaris

@chuntaojun chuntaojun transferred this issue from polarismesh/polaris Sep 2, 2023
@chuntaojun
Copy link
Member

这里需要引入最新的 polaris-java 支持无损上下线

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

No branches or pull requests

3 participants