Does roachmart use CockroachDB nodes located in different regions?

Large Scale Testing mentions:

roachmart Roachmart models a geo-distributed online storefront with users and orders

So in the test setup for roachmart, CockroachDB nodes are located in different regions such as us-east1-b and us-west1-b. Is my understanding correct?

Hi @yaojingguo,

Yes, the roachmart load generator included in the workload binary uses the table partitioning enterprise feature. Basically, it partitions a users table into three “localities” ("us-east1-b", "us-west1-b", and "europe-west2-b" by default):

CREATE TABLE users (
	zone STRING NOT NULL,
	email STRING NOT NULL,
	address STRING NULL,
	CONSTRAINT "primary" PRIMARY KEY (zone ASC, email ASC),
	FAMILY "primary" (zone, email, address)
) PARTITION BY LIST (zone) (
	PARTITION "us-east1-b" VALUES IN (('us-east1-b')), 
	PARTITION "us-west1-b" VALUES IN (('us-west1-b')), 
	PARTITION "europe-west2-b" VALUES IN (('europe-west2-b'))
)

It then creates zone configurations restricting each partition to a node with the matching locality. It’s therefore a prerequisite that the cluster’s nodes are started with the proper --locality flags.

You can read more about the table partitioning feature in our docs and on our blog.

Let me know if you have any follow-up questions or need help testing this out.

Best,
Jesse