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β
| Parameter | Description |
|---|---|
-Name | Name of the store |
-InstancePrefix | Prefix used to name nodes |
-InstanceCount | Number of nodes to create |
-ClustronPort | Starting cluster communication port |
-ClientPort | Starting 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 = 1per 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