Health checks
- How application health and platform observations affect traffic eligibility.
Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.
- The external health monitor sends a request through an entry target to the OBRH health operation. The operation checks the same-site database and Camel route version with a mocked provider leg.
- A failed sample can therefore come from entry routing, the application or its database dependency. A successful sample says nothing about an actual provider transaction.
- The proposed load-balancer monitor checks each worker-local gateway. A separate evaluator uses OBRH application and database observations to decide whether a whole site should receive new traffic.
- One unhealthy gateway can leave its healthy neighbours in service. A site-wide withdrawal goes through the designated configuration writer.
Reading
Traffic entry
- Cisco L7 uses least connections across mapped master/control-plane-node targets from both sites.
- Each target forwards into its own site's Istio path and selected Direct or IL Service.
- Adding application workers does not change the fixed master-target inventory.
- Use L4 TCP pass-through; consumer mTLS terminates at the worker-local Istio ingress gateway.
- Run an ingress gateway DaemonSet on each eligible worker; exclude control-plane nodes.
- Use a Service of type LoadBalancer with retained NodePorts and externalTrafficPolicy: Local.
Application health operation
Application health operation
- Cisco calls the configured health URL through each target's application path.
- DIY routing exposes the API from an existing business deployment in each site.
- The independent health Camel route checks the same-site DB/Camel route version; the provider leg is mocked.
Health result scope
- Success describes the sampled route/DB path through that target.
- It does not establish Kubernetes NodeReady or every application pod's capacity.
- Failure does not identify which layer failed.
- Cisco product/version and exact administrative-state semantics remain unidentified.
LB node membership
- Watch the selected Service, eligible worker Nodes and gateway EndpointSlices.
- Reconcile owned worker-IP:NodePort members and configure their monitor contract.
- Own only the site's Service/pool scope; preserve other-site and shared listener configuration.
- A watch failure or incomplete list is not an empty cluster: keep the last applied membership while resynchronizing.
- A LoadBalancer Service or loadBalancerClass does not create a Cisco adapter by itself.
Independent gateway monitor
- The external LB executes its own active checks without a Kubernetes API response for every probe.
- Check the selected worker's local gateway path; cross-node forwarding must not mask its failure.
- Service healthCheckNodePort concerns service-proxy/local-endpoint eligibility; Istio /healthz/ready concerns proxy readiness.
- Neither signal proves the OBRH route/DB operation succeeds.
- Failed checks change operational selection while the member remains registered.
OBRH site observation
- Reuse route/DB health logic inside existing application instances; keep the provider mocked.
- Use a restricted diagnostic entry with a finite execution budget outside business admission.
- Preserve diagnostic access when business endpoints are unready; bypass alone reserves no threads, CPU or DB sessions.
- Record instance identity, freshness and failure class; repeated calls reaching one backend remain one observation source.
Corroborated site evaluator
- Corroborate fresh results from distinct same-site instances before declaring the required function unavailable.
- Separate shared-function failure from overload, initialization and unknown observations.
- One 503 or timeout is not proof of a DB-server outage.
- Unknown/stale observations retain the last admission decision; they never restore a withdrawn site as healthy.
- This evaluator is proposed integration work, not a stock Kubernetes feature.
One configuration writer
- Apply the site decision through one bounded policy owner, or a separately owned supported gate.
- Prevent a second controller from overwriting members owned by the primary reconciler.
- Keep administrative admission/drain settings separate from operational monitor results.
- Controller loss retains the last configuration; native LB checks continue against registered targets.
Effective target eligibility
- Registered ∧ not draining ∧ site admitted ∧ native gateway monitor healthy
- Registration alone does not admit traffic.
- One unready application pod changes application routing, not worker membership.
- Ordinary overload stays a local protection decision; do not blindly transfer the whole load to the other site.
- Confirmed shared site failure withdraws admission without deleting discovered members.
Local readiness
- Local readiness calls the OBRH DB/Camel health API with a mocked provider; liveness uses a separate Actuator endpoint.
- Inspected templates use separate fixed probe delays and contain no startupProbe; no custom fatal-state publisher is established.
- Each Direct pod calls its own localhost:/route/dispatch through the readiness script. The default application port is 8080.
- The configured consumer is OBRH_HEALTH_CHECK; the service is obrh-healthcheck-lb-v1. Only HTTP 200 passes the script.
- The health operation checks the site's DB/Camel route-version state and uses a mocked provider leg. It does not test real provider availability.
- This local check does not traverse Cisco, the gateway Service or another application pod. It warms only the paths it actually executes.
- Startup and readiness call the same local health API through the shared nonblocking SemaphoreValve; startup gates both readiness and liveness.
- Consecutive readiness failures withdraw traffic and successful samples restore it. Stock SemaphoreValve supplies no hysteresis state machine or warm-admission ramp.
- After startup succeeds, the same local health API continues as readiness. Admission rejection, timeout or required DB/route failure can fail that sample.
- Consecutive failed readiness samples make the pod unready without restarting it. Existing requests continue; localhost probes keep running.
- Successful readiness samples restore eligibility after the configured recovery threshold. Endpoint and Istio routing changes then propagate.
- Immediate admission rejection protects the pod during sampling and propagation delay. An unrelated business 503 does not directly change readiness.
- If all pods are unready, normal application routing becomes unavailable once that state propagates. The Valve supplies no recovery timer, admission ramp or equal-load guarantee.
Independent dispatch routes
- Business calls and health calls enter the existing Tomcat application pipeline.
- Dispatch selects either the requested business Camel route or the configured health Camel route.
- The business route does not call the health route as a mandatory next step. Both are inside the same application JVM.
Existing probe schedule
Probe contracts
Choose the failure exposure you are willing to bear
If a Pod fails immediately after a successful readiness check, a five-second check interval can leave traffic exposed until the next observation. That is an explicit SRE risk decision: choose the window from the failed or slow requests the service can tolerate and the capacity available elsewhere. A false failure can instead withdraw useful capacity and overload the remaining replicas.
Make the tolerated window and threshold agree
Start with the next-check exposure window, then include failureThreshold, probe duration/timeout and endpoint propagation. For an illustrative five-second period and threshold of three failures, detection can span roughly 10–15 seconds from failure onset before those additional effects. This scheduling estimate is not a hard bound. If that exposure is unacceptable, change the contract or detection design rather than describing the configured interval as sufficient.
Relate the window to useful throughput
If illustrative failed attempts average 100 requests/second for a 10-second exposure window, about 1,000 attempts are exposed to that failure mode. That is not automatically 1,000 lost business transactions: retries, idempotency, rerouting and unknown outcomes change the result. Measure offered, successful, rejected, timed-out and retried requests together. If peers have enough capacity, readiness withdrawal can improve useful throughput despite reducing the ready replica count.
Liveness can create a longer capacity hole
After its failure threshold, liveness can restart the container. Termination, process startup, artifact work, configuration warmup and startup/readiness checks add to the period without useful capacity. Aggressive restart thresholds can turn transient CPU/GC/dependency pressure into repeated warmups; readiness should normally handle recoverable traffic ineligibility.
Tune by failure impact within each domain
Choose periods, thresholds and timeouts from the failure to detect, the acceptable exposure window and remaining domain capacity. Balance fast withdrawal against flapping, probe overhead and restart cost. Check recovery thresholds and endpoint convergence as well as detection. Domain/cluster isolation contains application failure only while shared storage, identity, network and other dependencies remain within their stated failure boundaries.
- The inspected Direct and IL templates contain readiness and liveness exec probes, with separate fixed initial delays. Neither contains startupProbe.
- Readiness begins after its own delay; liveness begins after its own delay. Readiness success does not enable liveness.
- Readiness failure makes the pod unready after its failure threshold. It does not itself restart the container; liveness can restart from either Ready or Unready.
- The scripts use a 3s curl budget, while the inspected templates also use timeoutSeconds: 3. The proposal adds enclosing budget margin.
- These are source contracts; effective deployed values and current runtime state are not established here.
Startup completion
Current versus proposed startup checking
The inspected Current Direct/IL Pod templates omit startupProbe. Their readiness and liveness schedules therefore rely on their own initial delays. The Proposed profile adds a dedicated repeated startup check, gates readiness/liveness until success, and stops startup checks after that first success. Exhausting the startup failure allowance is a restart condition. See the separate startup row in the lifecycle view.
- Add startupProbe using exactly the same localhost OBRH API and HTTP 200 success contract as readiness: DB/Camel route-version check plus mocked provider leg.
- While startup has not succeeded, Kubernetes suppresses both readiness and liveness probes. Startup success enables both independent probe loops.
- Reaching the startup failure budget restarts the container. A required DB outage during boot can therefore cause startup-driven restart even if the JVM process exists.
- Size this budget from measured initialization and dependency-recovery behavior. Repeated restart cannot repair a continuing DB outage; recovery and alerting must account for that boot-time failure mode.
- Broader business-route warmup remains explicit initialization work. One health call does not warm every business route.
One admission gate before dispatch
- Business calls and ordinary startup/readiness checks pass through the same instance of a shared Tomcat SemaphoreValve before dispatch selects their route.
- Set block to false (block=false) and highConcurrencyStatus to 503 (highConcurrencyStatus=503); derive concurrency from the measured payload and endpoint mix. Separate Valve instances do not share permits.
- With no permit, reject promptly with 503. Admitted synchronous work continues and releases its permit when downstream invocation returns.
- Stock SemaphoreValve does not cap the full lifetime of asynchronous work. Any async adoption must bind admission to completion and cancellation.
Restart-recoverable local failure
- The liveness script checks the same application's localhost /actuator/health/liveness endpoint and accepts HTTP 200.
- The SQL configuration enables management.health.livenessState.enabled and management.endpoint.health.probes.enabled.
- This establishes endpoint enablement. A custom publisher of a restart-worthy BROKEN state has not been established by the inspected evidence.
- The SQL's Actuator readiness-group setting does not define the custom OBRH dispatch script's success contract.
- Keep liveness inside the same application JVM and outside the business admission gate. A separate endpoint is not a separate health microservice.
- Define an explicit local fatal predicate for which container restart is expected to recover the application. DB outage and ordinary overload are excluded from that predicate.
- Publish that state through the selected liveness mechanism. The predicate, state publisher and endpoint wiring are adoption work; the current endpoint alone does not prove custom fatal-state detection.
- Once startup succeeds, liveness runs while the pod is Ready or Unready. Its failed-sample threshold can restart the container in either state.
- Gate bypass reserves no connector threads or CPU. Verify liveness responsiveness under saturation before adopting the design.
Protected site-health diagnostic
- Give the existing application a distinct restricted diagnostic entry with its own bounded execution budget, outside the business semaphore.
- Reuse the health route's DB/Camel logic and mocked provider leg. This distinguishes a shared dependency failure from ordinary business admission rejection.
- Keep this diagnostic reachable to the authorized site-health integration when business readiness has withdrawn the pod. It remains inside the existing application deployment.
- Deliberate pipeline placement or controlConcurrency implementation is required; stock SemaphoreValve has no configured URL-exclusion list.
Probe execution budget
- Startup and readiness use the same script and application bind port. Liveness uses the separate local endpoint on that application.
- Keep the endpoint/DB budget below the curl budget, and curl plus script overhead below the enclosing Kubernetes probe timeout.
- The values below illustrate the shape of the proposal. Replace them with measured startup, failure-detection and recovery budgets before rollout.
Illustrative Proposed startup, readiness and liveness budgetyaml
# Container fragment only; not a deployed configuration.
# Existing application environment supplies port/context and health headers.
# The current scripts use localhost and a 3-second curl budget.
# 5 seconds is an illustrative outer timeout with script/exec margin.
startupProbe:
exec:
command: [bash, -c, /scratch/scripts/readiness-check.sh]
periodSeconds: 10 # Illustrative; measure probe cost and boot behavior.
timeoutSeconds: 5
failureThreshold: 30 # Approx. 300-second nominal budget, not an exact deadline.
successThreshold: 1
readinessProbe:
exec:
command: [bash, -c, /scratch/scripts/readiness-check.sh]
periodSeconds: 10 # Illustrative withdrawal/recovery sampling interval.
timeoutSeconds: 5
failureThreshold: 3 # Illustrative consecutive failures before withdrawal.
successThreshold: 2 # Illustrative consecutive successes before restoration.
livenessProbe:
exec:
command: [bash, -c, /scratch/scripts/liveness-check.sh]
periodSeconds: 20 # Illustrative; choose with the local fatal predicate.
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
Probe adoption checks
- Measure startup with slow initialization and a DB outage; confirm startup failure restarts and successful startup enables both probe loops.
- Confirm startup/readiness and business requests share the same Valve instance; confirm liveness and the protected diagnostic bypass it deliberately.
- Test DB outage after startup: readiness withdraws the pod; the liveness fatal predicate stays healthy for that dependency failure.
- Test the implemented local fatal predicate while Ready and Unready; confirm only its liveness failure threshold requests restart.
- Test saturation, diagnostic responsiveness, all-pods-unready recovery and routing propagation using the selected budgets.
Retirement and recovery
- Block new assignments using the product's exact administrative-state semantics.
- Drain existing traffic, then remove the gateway member and worker.
- Cordon and kubectl drain alone are insufficient: DaemonSet gateways can remain running; controllers may react immediately to schedulability.
- Verify persistence: a product's Disabled or drain state may still admit persistent new connections.
- Restore site admission only after stable successful observations, within the survivor's safe capacity.
External LB integration choices
- Keep Cisco as Current; identify its product/API before claiming compatibility.
- F5 BIG-IP + CIS provides a documented NodePort/controller/native-monitor reference.
- HAProxy supplies native checks and dynamic APIs; this exact worker-pool integration needs additional ownership.
- F5 BIG-IP + CIS is the closest documented reference for the requested appliance/NodePort integration.
- HAProxy offers flexible controls with more integration ownership for this topology.
- Neither reference silently replaces the existing Cisco deployment.
Existing Cisco capability scope
- Current is identified only as Cisco L7 least-connections.
- Product, version, management API and exact monitor configuration remain unestablished.
- Historical Cisco ACE capabilities do not establish modern Kubernetes integration.
- Do not label Cisco incapable without identifying the actual product.
- Keep the proposed capability contract vendor-neutral until compatibility is demonstrated.
Documented F5 membership and monitor reference
- CIS supports Service type LoadBalancer and creates objects on external BIG-IP.
- NodePort mode registers schedulable node IPs with Service NodePorts; labels scope eligible workers.
- CIS 2.18+ supports a matching loadBalancerClass; F5 CRDs remain required.
- Service annotations can provision or reference native BIG-IP pool monitors.
- Service/class support · NodePort networking · Controller parameters
- BIG-IP executes pool checks on the appliance; CIS is not the per-probe executor.
- Administrative member control is separate from observed health.
- TCP passthrough forwards the consumer session without terminating TLS on BIG-IP.
- Source-IP preservation requires its own SNAT/routing decision.
- Native monitor contract · Member-state API · TransportServer forwarding
- Stock CIS membership support does not establish an OBRH site evaluator or drain-before-removal workflow.
- Schedulability changes can affect membership; coordinate retirement before cordon and test the selected release.
- A custom evaluator must not race CIS/AS3 over the same member state.
- BIG-IP Disabled can admit new connections for existing persistence records; Forced Offline preserves established connections while blocking new ones.
- Verify the chosen administrative state instead of treating “disable” as a universal no-new-work action.
HAProxy integration alternative
- Native active TCP/HTTP checks and dynamic server-management APIs are available.
- The official external Kubernetes-controller example uses direct Pod routing with Calico/BGP.
- That example does not prove this exact worker-IP:NodePort LoadBalancer-class integration.
- A custom implementation must own membership, durable configuration, independent checks and restart restoration.
- Runtime-added servers need explicit check activation; runtime changes alone do not survive reloads.
- drain can admit persistent new connections; maint stops checks. Match the retirement contract deliberately.
LB control-loop and failure checks
- Keep one authoritative writer per object, or separately owned supported gates.
- A failing control-plane watch must not erase the last member set.
- Native monitors have no per-probe Kubernetes API dependency; test the complete deployment's outage behavior.
- Keep registration, target health and site admission as distinct states.
- Stop the controller/block Kubernetes API access: native monitors must still detect a failed gateway.
- Remove a node-local gateway: a remote gateway must not mask failure.
- Repeat samples from one pod: they remain one observation source.
- Exhaust one pod's permits: do not infer a site DB outage.
- Lose site observations: retain the last gate without declaring fresh success.
- Retire a worker with persistent connections: verify gate → drain → removal.
- Restore a stale watch: obtain a complete state before deleting members.
- Test recovery and all-targets-unavailable behavior without overloading the survivor.