Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

instance termination plugin support#1134

Open
adyach wants to merge 3 commits intomasterfrom
termination-notification
Open

instance termination plugin support#1134
adyach wants to merge 3 commits intomasterfrom
termination-notification

Conversation

@adyach
Copy link
Copy Markdown
Member

@adyach adyach commented Dec 23, 2019

One-line summary

it should be possible to notify nakadi about coming instance termination, that it can release used resources and prepare itself for termination. A good example would be subscription connection termination in clean way, that consumer will not wait commit timeout

PR is not compilable due to plugin api change, which is expected here zalando-nakadi/nakadi-plugin-api#10

@RequestMapping(method = GET)
public ResponseEntity<String> healthCheck() {
if (terminationService.isTerminating()) {
return ResponseEntity.status(HttpStatus.IM_A_TEAPOT_418).build();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be used by Nakadi Proxy? When maintaining the list of healthy Nakadi instances, those who report 418 during health check will not be added to the final result but at the same time not marked as unhealthy?

return this;
}

public Builder setTerminationService(final TerminationService terminationService) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this is set also in the constructor. Is this used or needed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants