BetterAndBetterII opened a new pull request, #13894:
URL: https://github.com/apache/apisix/pull/13894

   ## Description
   
   Active health checks write the real target state to shared memory, then 
notify other nginx workers over `resty.events`. Routing still used 
`get_target_status()`, which only reads that worker-local cache, and the 
balancer picker was keyed on `checker.status_ver` (bumped only when this worker 
receives the event).
   
   A worker that missed the event (or whose checker was created after another 
worker already flipped the node) kept sending traffic to a node that was 
already unhealthy in shm — for minutes in multi-worker deployments with 
priority failover.
   
   This change:
   
   1. Consults shm first in `fetch_node_status` (falling back to the local 
cache when shm has no entry yet).
   2. Includes shm health in the picker / health-status cache key so a shm-only 
flip rebuilds the picker without waiting for a local event.
   
   ## Checklist
   
   - [x] I have explained the purpose of this PR based on the related issue.
   - [x] I have added related tests.
   - [x] I have updated related documents.
   - [ ] I have resolved conflicts related to this PR.
   
   Fixes #13888


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to