Skip to main content

Farming Cluster

A farming cluster allows you to scale your operation across multiple machines and storage devices for maximum efficiency and redundancy.

Cluster Architecture

Key Concept: The controller connects to the blockchain node via RPC and coordinates all cluster components (cache, plotters, farmers) through NATS messaging. Only the controller talks to the blockchain; farmers communicate through the controller.

Port Requirements

PortProtocolComponentPurposeExpose to Internet
30333TCPNodeConsensus P2P Yes
30433TCPNodeDSN communication Yes
30533TCPControllerCluster Controller P2P Yes
9944TCPNode → ControllerRPC communication Internal only
4222TCPNATS ↔ All cluster components*Internal coordination Internal only

*NATS connects to: Controller, Cache, Plotter, Farmer (but NOT the Node)

Cluster Communication
  • Node: Handles blockchain P2P (30333, 30433) and provides RPC to controller (9944)
  • Controller: Talks to node via RPC (9944), connects to blockchain peers (30533), and coordinates via NATS (4222)
  • All other components: Only communicate through NATS (4222) - no direct blockchain access

Network Setup Guide

Step 1: Controller Machine Configuration

Configure these port forwarding rules for the controller machine:

ServiceExternal PortInternal IPInternal PortProtocol
Consensus30333Controller IP30333TCP
DSN30433Controller IP30433TCP
Cluster Controller30533Controller IP30533TCP

Do NOT forward:

  • Port 4222 (NATS) - internal cluster communication only
  • Port 9944 (RPC) - internal cluster communication only

Step 2: Farmer Machines Configuration

Farmer machines only need internal network access to communicate with the controller's NATS server:

No port forwarding needed for farmer machines. They only communicate internally with the controller.

Step 3: Internal Network Configuration

Set up the internal cluster network:

# 1. Assign static IPs or DHCP reservations
# Controller: 192.168.1.10
# Cache Server 1: 192.168.1.11
# Cache Server 2: 192.168.1.12
# Farmer 1: 192.168.1.21
# Farmer 2: 192.168.1.22
# etc.

# 2. Ensure all machines can communicate
# Test from each machine:
ping 192.168.1.10 # Controller
telnet 192.168.1.10 4222 # NATS server
telnet 192.168.1.10 9944 # Node RPC