Skip to content

region sharding example#6209

Merged
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ds-region-sharding-demo
May 29, 2020
Merged

region sharding example#6209
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ds-region-sharding-demo

Conversation

@deepthi
Copy link
Copy Markdown
Collaborator

@deepthi deepthi commented May 21, 2020

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

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi requested a review from sougou as a code owner May 21, 2020 00:26
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
Copy link
Copy Markdown
Collaborator Author

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?

Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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>
@deepthi deepthi merged commit e7c58d5 into vitessio:master May 29, 2020
@deepthi
Copy link
Copy Markdown
Collaborator Author

deepthi commented May 29, 2020

Multi-cell will be added in a future PR.

@deepthi deepthi deleted the ds-region-sharding-demo branch July 6, 2020 19:00
@deepthi deepthi added this to the v7.0 milestone Jul 17, 2020
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