Venice Multi-Datacenter Docker Quickstart#
Follow this guide to set up a multi-datacenter venice cluster using docker images provided by Venice team.
Step 1: Install and set up Docker Engine and docker-compose#
Follow https://docs.docker.com/engine/install/ to install docker and start docker engine
Step 2: Download docker-compose-multi-dc-setup.yaml file#
wget https://raw.githubusercontent.com/linkedin/venice/main/docker/docker-compose-multi-dc-setup.yaml
Step 3: Run docker compose to bring up Venice multi-colo setup#
Step 4: Access venice-client container's bash shell#
Step 5: Make sure that you're in /opt/venice directory#
Step 6: Create a store#
Note: If you change the store name from test-store to something else, you will have to modify /opt/venice/sample-data/multi-dc-configs/batch-push-job.properties and /opt/venice/sample-data/multi-dc-configs/inc-push-job.properties to use the provided store name.
./create-store.sh http://venice-controller.dc-parent.venicedb.io:5555 venice-cluster0 test-store sample-data/schema/keySchema.avsc sample-data/schema/valueSchema.avsc
Step 7: Let's add a dataset to the store using batch push#
Print dataset#
Run a push job#
Fetch data from dc-0#
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 90 # should return a value
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 100 # should return a value
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 110 # should return null
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 120 # should return null
Fetch data from dc-1#
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 90 # should return a value
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 100 # should return a value
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 110 # should return null
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 120 # should return null
Step 8: Let's update some existing records in the dataset and add few new records using incremental push#
Print records to be updated and added to the existing dataset in the store#
Run incremental push job#
Fetch data from dc-0#
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 90 # should return an unchanged value
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 100 # should return an updated value
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 110 # should return inserted value
./fetch.sh http://venice-router.dc-0.venicedb.io:7777 test-store 120 # should return null
Fetch data from dc-1#
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 90 # should return an unchanged value
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 100 # should return an updated value
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 110 # should return inserted value
./fetch.sh http://venice-router.dc-1.venicedb.io:7777 test-store 120 # should return null