0

I have a spring boot service that send and receive messages only from a kafka topic, I want to remove the web server (tomcat) since there is no need for it. The problem is the service is currently deployed on ECS and the end point /actuator/health is used to check the health of the service, which means if I remove the web server the deployment in the pipeline won't be successful since the health checks will fail,

I tried making the ALB internal but the Kafka service is not in the same VPC and the service couldn’t connect

Is there any solutions to isolate the service ?

bessam Sahli
  • 105
  • 7
  • Change the healthcheck endpoint? – Riz Apr 12 '22 at 10:31
  • can you elaborate please ? @Riz – bessam Sahli Apr 12 '22 at 10:36
  • You can change your endpoint for the healthchecks on ALB. Instead of /actuator/health, do checks on a port which your application uses and you are sure if that port is not listening, it means your application is broken. Healthchecks are used to kow if your alb needs to route traiffic the the nodes or not. If you make healthchecks on let's say port 22 and your application is not running, still the traffic will be routed to your nodes. So the whole point of healthcheck is the traffic routing. – Riz Apr 12 '22 at 12:05
  • @Riz but the target group health check configuration supports only HTTP/HTTPS traffic, it will send an HTTP GET request to the endpoint you specify and expect a response with code 200-399 – bessam Sahli Apr 12 '22 at 13:09
  • You have Kafka pushing messages to the ECS servers, via the load balancer somehow? – Mark B Apr 12 '22 at 17:21
  • Yes @Riz kafka is using other ports and TCP protocol to connect to the services in ECS – bessam Sahli Apr 13 '22 at 09:46

0 Answers0