Java-OCA-OCPP icon indicating copy to clipboard operation
Java-OCA-OCPP copied to clipboard

Cloud HTTP health check of LoadBalancer keep UNHEALTHY

Open danielcaro opened this issue 3 years ago • 5 comments

Problem:

When the service is deployed to GKE or any K8s behind load balancer with health check, the validator will try fetch HTTP response or TCP (https://cloud.google.com/load-balancing/docs/health-check-concepts#criteria-protocol-ssl-tcp) , but the Java Websocket implementations make fail the health check, and the service keep UNHEALTHY .

Solution:

Implement a Draft_HttpHealthCheck using the suggestion proposed by @SerVB at https://github.com/TooTallNate/Java-WebSocket/issues/1077 becauseJava_Websocket owner said that will not provide a draft to support http health check.

PS: If you like I can send a PR with my approach solution, that already works well :D .

danielcaro avatar Mar 01 '22 13:03 danielcaro

Hi @danielcaro

Yes please set up a PR, I'll gladly review your code and merge it if it passes the automated tests.

Sincerely, Thomas

TVolden avatar Mar 02 '22 06:03 TVolden

Hi, I found some problems now, I gonna test the solution at production first. Then I'll sent the PR.

danielcaro avatar Apr 06 '22 05:04 danielcaro

The solution was tested on production, but I would like to hear your advice.

https://github.com/ChargeTimeEU/Java-OCA-OCPP/pull/189

danielcaro avatar May 14 '22 18:05 danielcaro

Okay, the PR is merged. Please check if it works as intended and close the issue :)

TVolden avatar May 15 '22 12:05 TVolden