Citrix CCP-N study materials
Citrix CCP-N study resources

HTTP Monitor Flapping During a Flash Sale

Citrix CCP-N · Put your knowledge to work in context.

All case studies

HTTP Monitor Flapping During a Flash Sale

An e-commerce application is load balanced by a Citrix ADC VPX using an HTTP-ECV monitor. The service group has six services. Monitor settings are interval 5 seconds, timeout 2 seconds, retries 3, receive string 'HealthCheck OK'. During a flash sale, application response time rises to 4-7 seconds even though server CPU is only 65%. Three services repeatedly transition DOWN and UP every few minutes, and roughly 20% of users receive 503 errors or lose their session. Persistence is source-IP with a 20-minute timeout. The application team insists the servers are healthy and points to successful manual curl tests from a jump host. The ADC is not CPU-bound; one packet engine is at 35%. You need to stop the false downs without hiding a real outage, and you must preserve persistence for checkout sessions.

1. Show the timing math that explains the flapping and state the trade-off in simply raising the timeout.

Read the worked answer

The monitor's timeout is 2 seconds, but the application takes 4-7 seconds. Each probe is sent, waits 2 seconds, then fails. With interval 5 seconds and retries 3, the service can be marked DOWN after roughly 10-12 seconds of failing probes, even though the application is merely slow. When load shifts, a probe may succeed again and the service comes UP, causing flapping. Raising the timeout to 30 seconds reduces false downs but delays real failure detection and can leave a dead service in rotation. The correct trade-off is to use a fast application health endpoint that is independent of the slow checkout path, then set timeout above that endpoint's normal response but below the acceptable outage-detection window. The monitor should test what the ADC needs to know, not the slowest transaction the application can perform.

2. Recommend specific monitor and service-group changes, including values, and explain how they preserve availability.

Read the worked answer

Create a lightweight /health endpoint that returns HealthCheck OK without database calls. Configure HTTP-ECV with interval 15s, timeout 10s, retries 3, and receive string HealthCheck OK. Bind the monitor to the service group, not individual services, so new members inherit it. Enable slow start 60s so a recovered service receives traffic gradually instead of a burst. Keep source-IP persistence if NAT is stable, but for checkout prefer cookie persistence with a 20-minute timeout; source-IP can pin many users behind one NAT to one service. Worst-case detection is about 40 seconds, which avoids 4-7 second false timeouts while still failing over within an acceptable window. If the application team cannot provide a fast health endpoint, use a TCP monitor plus a separate application probe, but do not hide application failure behind a port check.

3. What would you check in nstrace or ADC statistics before changing the monitor?

Read the worked answer

Before changing the monitor, capture nstrace on the ADC filtered to the monitor source and service IP, and check stat monitor, stat lb service, and service-group member states. Confirm the probe is timing out rather than receiving a TCP RST or an HTTP 500. Check server-side response time and queue depth, not just CPU; a 65% CPU server can still have a 7-second database wait. Also verify the ADC's own packet engine, max connections, and TCP window. If the manual curl from the jump host is fast, compare source interface, VLAN, and route. Only after confirming the health path is slow should you relax the monitor.