Skip to main content

Creating a Store

A store is the primary unit in Clustron DKV.

It represents a logical cluster where data and coordination are managed.


What You Will Do​

Creating a store defines:

  • How many nodes will run
  • How they are named
  • Which ports they will use

Command: New-DkvStore​

Use this command to create a new store.

Syntax​

New-DkvStore `
-Name <StoreName> `
-InstancePrefix <Prefix> `
-InstanceCount <Count> `
-ClustronPort <Port> `
-ClientPort <Port>

Parameters​

ParameterDescription
-NameName of the store
-InstancePrefixPrefix used to name nodes
-InstanceCountNumber of nodes to create
-ClustronPortStarting cluster communication port
-ClientPortStarting client connection port

Understanding InstanceCount​

InstanceCount controls how many nodes will be created.

Single Machine​

  • Set InstanceCount > 1
  • Multiple nodes run on the same machine
InstanceCount = 2 β†’ node1, node2 (same machine)

Multiple Machines​

  • Use InstanceCount = 1 per machine
  • Each machine runs its own node
Machine A β†’ node1  
Machine B β†’ node2

Understanding Ports​

Ports are assigned starting from the values you provide.

For multiple nodes, ports are automatically incremented.

Example​

ClustronPort = 7811 β†’ 7811, 7812, ...
ClientPort = 7861 β†’ 7861, 7862, ...

Each node gets its own unique ports.


Example: Single Machine (2 Nodes)​

New-DkvStore `
-Name TestStore `
-InstancePrefix node `
-InstanceCount 2 `
-ClustronPort 7811 `
-ClientPort 7861

Example: Multi-Machine Setup​

Run on each machine:

New-DkvStore `
-Name TestStore `
-InstancePrefix node `
-InstanceCount 1 `
-ClustronPort 7811 `
-ClientPort 7861

What Happens After Creation?​

  • The store configuration is registered
  • Nodes are defined but not yet running
  • You must start the store to activate it

Common Issues​

Port Already in Use​

  • Ensure selected ports are free
  • Avoid overlapping ranges between nodes

Incorrect InstanceCount​

  • Too high β†’ port conflicts
  • Too low β†’ insufficient nodes

What’s Next​

πŸ‘‰ Continue to Starting & Stopping Stores to activate your store