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

feat: make healthcheck more resilient (retry + reconnect) #26

Open
Dentrax opened this issue Mar 10, 2023 · 1 comment
Open

feat: make healthcheck more resilient (retry + reconnect) #26

Dentrax opened this issue Mar 10, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Dentrax
Copy link
Member

Dentrax commented Mar 10, 2023

In current implementation, I noticed healthcheck function 1 does not support for retrying along with graceful handling. 2

Proposal
It would be nice to add a something failureThreshold to ConfigHealthCheck. So that after ping fails failureThreshold times in a row, go-dcp-client should treats the CB connection as unhealthy and triggers a restart/reconnect for that specific server.

Happy to discuss reasonable.

Footnotes

  1. https://github.com/Trendyol/go-dcp-client/blob/16ab8a163b085e1578d688e0e38a617e8cfd028b/dcp.go#L56-L70

  2. https://github.com/Trendyol/go-dcp-client/blob/16ab8a163b085e1578d688e0e38a617e8cfd028b/dcp.go#L117

@erayarslan
Copy link
Member

thank you so much @Dentrax i think its very good idea. also we need to cover /status endpoint to same way.

https://github.com/Trendyol/go-dcp-client/blob/master/api.go#L48

@erayarslan erayarslan added the enhancement New feature or request label Mar 11, 2023
@erayarslan erayarslan changed the title proposal: make healthcheck more resilient (retry + reconnect) feat: make healthcheck more resilient (retry + reconnect) Dec 18, 2023
@erayarslan erayarslan self-assigned this Dec 18, 2023
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

2 participants