CodexBloom - Programming Q&A Platform

OCI Load Balancer Health Check scenarios with 'Unhealthy' Status for Custom Backend Service Configuration

👀 Views: 1838 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-10
oracle-cloud-infrastructure load-balancer nodejs health-check JavaScript

I'm a bit lost with I'm wondering if anyone has experience with I keep running into I'm sure I'm missing something obvious here, but I'm working with an scenario with configuring an OCI Load Balancer where my backend service is consistently reporting a health check status of 'Unhealthy'. I have a Compute Instance running a Node.js application that listens on port 3000. The health check is configured to hit the `/health` endpoint, which returns a JSON response indicating the service status. I've verified that the endpoint is functioning correctly by testing it directly through curl: ```bash curl http://<instance-private-ip>:3000/health ``` This returns: ```json {"status":"ok"} ``` In the Load Balancer settings, I've configured the health check with the following parameters: - Protocol: HTTP - Port: 3000 - URL Path: /health - Interval: 10 seconds - Timeout: 5 seconds - Healthy threshold: 2 - Unhealthy threshold: 3 Despite this configuration, the Load Balancer shows the backend instance as unhealthy. I checked the security list for the subnet and ensured that ingress rules allow traffic on port 3000. The Load Balancer is also in the same availability domain as the backend compute instance. I've looked at the Load Balancer logs and noticed the following behavior messages: ``` HTTP/1.1 404 Not Found ``` This leads me to believe that the Load Balancer is unable to reach my application, but I can confirm that the application is indeed running and accessible internally. I've also tried adding a simple GET route that returns a success message without any logic, but the scenario continues. Does anyone have insights on what might be going wrong here? Are there any best practices or common pitfalls with OCI Load Balancer configurations that I might be overlooking? I'm working on a API that needs to handle this. I'm working with Javascript in a Docker container on Ubuntu 22.04. I appreciate any insights! This is my first time working with Javascript 3.10. I'd be grateful for any help.