Switch traffic to the target keyspace
sharding & workflows
// what it does
Routes queries for the moved tables to the target keyspace — stageable with --replicas-only to move read traffic first while primaries stay on the source. Reverse replication keeps the source in sync, so this step is fully reversible.
// shell
$ pscale workflow switch-traffic mydb main 1 --replicas-only$ pscale workflow switch-traffic mydb main 1$ pscale workflow reverse-traffic mydb main 1// gotcha
This is the moment users touch the new keyspace: watch error rates and latency, and remember reverse-traffic returns everything to the source instantly if something's wrong. Nothing is deleted yet.