Repository navigation
Conversation
… each The requests that are under way on a node when it fails all fail, and each marked the node dead again, adding a failed attempt. The back-off doubles every two attempts and stops at 30 minutes, so a few dozen concurrent requests that met a blip of a few seconds kept the node out of rotation for half an hour: in a one hour soak with 64 workers, two nodes were out for 30 minutes at a time (the second time after they had come back at the end of the first). A failure on a node that is already dead now changes nothing; one after the pool offered it again goes one attempt further. The node.dead metric counts the node going out, not each request that said so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔍 Preview links for changed docs |
API changes in this pull request: suggested version change NoneCompared with the base branch
Since the last release: Major, 42 breaking changes; for information, it does not fail this checkElastic.Transport.dll: Major, 28 breaking changes
Elastic.Transport.VirtualizedCluster.dll: Major, 14 breaking changes
Public API files✅ The committed API files match the build (7 files). |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The one hour soak (#308), 64 workers, 3 nodes, nodes 1 and 2 failing now and then: the nodes gauge said 1 alive / 2 dead from second 20 to second 1840, one interval of 3/0, and 1 alive / 2 dead again to the end.
elastic.transport.node.deadshows why: 84 and 106 dead events for the two nodes in the first ten minutes, then none, then 92 and 49 at minute 30. The first burst of dead events took both nodes out for exactly 30 minutes (the back-off cap); the pings at minute 30 brought them back; the next burst took them out for the next 30. The servers were up again within a minute each time.The cause: every request that fails on a node calls
MarkDead, which adds a failed attempt, and the back-off isDeadTimeout × 2 × 2^(attempts/2 − 1)capped atMaxDeadTimeout(30 minutes). A node that fails while 64 requests are under way on it fails them all: 64 failed attempts for one outage, so 30 minutes. Any service with some concurrency does this to every node that blips.What
A failure on a node that is already
Deadchanges nothing (Node.MarkDeadUnlessDead, internal, one compare-and-swap): the request was under way when the node went out, and says nothing the pool does not know. A node that fails after the pool offered it again (Resurrected) goes one attempt further, so the back-off still grows for a node that stays down. The publicNode.MarkDeadis unchanged.elastic.transport.node.deadcounts the node going out and not each request that failed on it.docs/request-pipeline.mdsays so.Tests
ConcurrentFailureBackoffTests: 16 requests that fail together on a node leave it with 1 failed attempt and a dead-until within three minutes (it was 16 attempts, hours, before: the back-off reached its cap); the node-level transitions (Deadstays,Resurrectedgoes to 2,MarkAliveresets). The transport test fails with the old call. Transport, Properties and Integration suites pass on net10.0.🤖 Generated with Claude Code