Skip to content

docs: add runnable multi-replica cluster-mode sample - #1248

Open
mykytanetipa wants to merge 1 commit into
multiserver/integration-testsfrom
multiserver/sample
Open

mykytanetipa wants to merge 1 commit into
multiserver/integration-testsfrom
multiserver/sample

Conversation

@mykytanetipa

Copy link
Copy Markdown
Collaborator

Adds a runnable sample showing how to deploy the server as several replicas, as end-to-end documentation for the cluster package. Sample only, no changes under src/.

Key changes:

  • Starts N replicas as separate processes sharing one database.
  • A driver starts a task on one replica, watches it from a second, and cancels it from a third.
  • Defaults to a shared SQLite file so it runs with no external services; set A2A_CLUSTER_DSN to point every replica at Postgres or MySQL instead.

Run it from the repository root:

python -m samples.clustermode.run_cluster --replicas 3 --base-port 41241
python -m samples.clustermode.exercise --host 127.0.0.1 --ports 41241,41242,41243

@mykytanetipa
mykytanetipa added this pull request to stack #1246 September 17, 2026 08:52
@mykytanetipa
mykytanetipa force-pushed the multiserver/sample branch 2 times, most recently from 82652ef to 8280197 Compare September 17, 2026 10:16
@mykytanetipa
mykytanetipa marked this pull request as ready for review September 17, 2026 10:51
@mykytanetipa
mykytanetipa requested a review from a team as a code owner September 17, 2026 10:51
samples/clustermode runs several DefaultRequestHandlerV2 replicas sharing one
database-backed versioned store and event stream, with a driver that exercises
send / resubscribe / cancel routed across replicas. Serves as end-to-end
documentation for deploying the server without task affinity.

This branch has not been deployed

No deployments
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.

1 participant