Skip to content

Conversation

@jakobht
Copy link
Member

@jakobht jakobht commented Nov 25, 2025

Depends on #7475 and #7478 being merged

What changed?
Added canary pinger component that periodically sends ping requests to shard owners to verify executor-to-executor communication and shard ownership.

Why?
The canary pinger provides active monitoring of the shard distributor's routing and ownership mechanisms by:

  • Periodically selecting random shards and pinging their owners
  • Verifying that the pinged executor owns the shard
  • Detecting communication failures between executors

This is part of the canary ping/pong implementation that validates end-to-end executor-to-executor gRPC communication.

How did you test it?
Unit tests

Potential risks

Release notes

Documentation Changes

@jakobht jakobht marked this pull request as draft November 25, 2025 09:24
@jakobht jakobht changed the title Add canary pinger for periodic shard ownership verification feat:(shard-distributor): Add canary pinger for periodic shard ownership verification Nov 25, 2025
@jakobht jakobht force-pushed the add-canary-pinger-new branch from 34d56e5 to ddf0d74 Compare November 26, 2025 10:20
@jakobht jakobht changed the title feat:(shard-distributor): Add canary pinger for periodic shard ownership verification feat(shard-distributor): Add canary pinger for periodic shard ownership verification Nov 26, 2025
@jakobht jakobht force-pushed the add-canary-pinger-new branch 4 times, most recently from 41c171c to 1c77d48 Compare December 1, 2025 14:26
@jakobht jakobht marked this pull request as ready for review December 1, 2025 14:27
Implement the client-side pinger that periodically pings random shard
owners to verify:
1. Executors can route to each other based on shard ownership
2. Shard ownership information is accurate
3. The shard distributor is functioning correctly

The pinger:
- Selects random shards at regular intervals (1s with 10% jitter)
- Sends ping requests to the executor owning each shard
- Validates that the receiving executor actually owns the shard
- Logs warnings when ownership is incorrect

Dependencies:
- Requires ShardDistributorExecutorCanaryAPI proto and client
- Will use SpectatorPeerChooser for routing (wired in later commit)

Signed-off-by: Jakob Haahr Taankvist <[email protected]>
Signed-off-by: Jakob Haahr Taankvist <[email protected]>
Signed-off-by: Jakob Haahr Taankvist <[email protected]>
@jakobht jakobht force-pushed the add-canary-pinger-new branch from 1c77d48 to 30fc04e Compare December 2, 2025 13:32
}

// Verify response
if !response.GetOwnsShard() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when do we expect this? is it in case spectator client in the peerchooser has outdated info?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - it's also a test. This should rarely happen, so if canary sees this a lot we have problems.

@jakobht jakobht merged commit fa5fee5 into cadence-workflow:master Dec 2, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants