Create a sharded keyspace

sharding & workflows

// what it does

Creates a new keyspace with N shards — the container you'll move hot tables into when one primary can't take the write load anymore. Each shard is its own cluster of the size you choose.

// shell

$ pscale keyspace create mydb main sharded-ks --shards 2 --cluster-size PS-40 --wait

// gotcha

Shard count and cluster size multiply into real money (4 shards × PS-40 = 4 clusters). Sharding is a one-way architectural door — exhaust vertical scaling (keyspace resize) first.

// resources