-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
region sharding example #6209
region sharding example #6209
Conversation
Signed-off-by: deepthi <deepthi@planetscale.com>
CELL=zone1 ./scripts/vtctld-up.sh | ||
|
||
# start vttablets for main keyspace. we start only one tablet each (master) | ||
CELL=zone1 TABLET_UID=100 ./scripts/mysqlctl-up.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: we are keeping all shards in the same cell. Will it make the example better to create multiple cells and put each shard in a different cell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I think it will be important to showcase multi-cell.
CELL=zone1 ./scripts/vtctld-up.sh | ||
|
||
# start vttablets for main keyspace. we start only one tablet each (master) | ||
CELL=zone1 TABLET_UID=100 ./scripts/mysqlctl-up.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I think it will be important to showcase multi-cell.
Signed-off-by: deepthi <deepthi@planetscale.com>
Multi-cell will be added in a future PR. |
This example shows how to use a multi-column vindex + lookup vindex to shard using a location column.
The main table (customer) is sharded using a region_json vindex. The lookup table is sharded using keyspace_id so that the customer data and lookup data reside in the same shard.
Signed-off-by: deepthi deepthi@planetscale.com