CodexBloom - Programming Q&A Platform

OCI Load Balancer Health Check scenarios with 429 Too Many Requests scenarios

đź‘€ Views: 128 đź’¬ Answers: 1 đź“… Created: 2025-06-08
oci load-balancer node.js express health-check javascript

I'm confused about I'm working on a personal project and This might be a silly question, but Hey everyone, I'm running into an issue that's driving me crazy... I'm currently working with an scenario with my Oracle Cloud Infrastructure (OCI) Load Balancer setup. I've configured a load balancer to distribute traffic to a set of backend instances running a Node.js Express application. However, the health check for the backend service is consistently failing with a `429 Too Many Requests` behavior. The application is supposed to handle a decent amount of traffic but seems to be hitting rate limiting, even for health check requests. I've set up the load balancer's health check configuration to use a GET request on the `/health` endpoint, which simply returns a 200 OK response. Here’s the health check configuration I've implemented: ```json { "protocol": "HTTP", "urlPath": "/health", "port": 3000, "intervalInMillis": 10000, "timeoutInMillis": 2000, "healthyThreshold": 1, "unhealthyThreshold": 2 } ``` On the backend, my Express app has the following route for the health check: ```javascript app.get('/health', (req, res) => { res.status(200).send('OK'); }); ``` I've confirmed that the load balancer can route requests to the backend instances, and when I manually curl the health endpoint from a local machine, I get the expected 200 response. However, I noticed that the application’s logs show a pattern of incoming requests being rate limited, and I suspect this might be the reason behind the health check failure. I’ve tried increasing the rate limit and adjusting CORS settings in the Express app but haven’t seen any changes. Here’s the middleware I'm using for rate limiting: ```javascript const rateLimit = require('express-rate-limit'); const limiter = rateLimit({ windowMs: 1 * 60 * 1000, // 1 minute max: 100 // limit each IP to 100 requests per windowMs }); app.use(limiter); ``` I’m unsure whether this is a configuration scenario with the health check on the load balancer or if there’s something wrong with how my application is processing these health check requests. Any insights or suggestions on how to resolve this would be greatly appreciated! This is part of a larger CLI tool I'm building. Has anyone else encountered this? My development environment is macOS. How would you solve this? I'm coming from a different tech stack and learning Javascript. Any advice would be much appreciated. I'm working in a Linux environment. Am I missing something obvious?