go-dcp icon indicating copy to clipboard operation
go-dcp copied to clipboard

feat: make healthcheck more resilient (retry + reconnect)

Open Dentrax opened this issue 2 years ago • 1 comments

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.

Dentrax avatar Mar 10 '23 21:03 Dentrax

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 avatar Mar 11 '23 02:03 erayarslan