Network Configuration¶
The network section configures how your node connects to the Manta platform manager and how it provides services to running tasks.
Overview¶
Network configuration controls:
Manager service connection settings
Light service (local gRPC) endpoints
Connection timeouts and retries
Network optimization parameters
Configuration Example¶
[network]
manager_host = "localhost"
manager_port = 50051
light_service_host = "0.0.0.0"
light_service_port = 0 # Auto-assigned
Configuration Fields¶
manager_host¶
Type: string
Default: "localhost"
Description: Hostname or IP address of the Manta manager service
Examples:
# Local development
manager_host = "localhost"
manager_host = "127.0.0.1"
# Production deployments
manager_host = "manager.manta.io"
manager_host = "10.0.1.100"
manager_host = "manta-manager.internal"
# Environment variable
manager_host = "${MANTA_MANAGER_HOST:localhost}"
DNS Resolution:
Supports both IPv4 and IPv6 addresses
Can use hostnames with DNS resolution
Validates connectivity on startup
manager_port¶
Type: integer
Default: 50051
Description: Port number for manager gRPC service
Valid Range: 1024-65535
Examples:
# Standard gRPC port
manager_port = 50051
# Custom port
manager_port = 8080
# Environment variable
manager_port = ${MANTA_MANAGER_PORT:50051}
Common Ports:
50051
: Default gRPC port443
: HTTPS/gRPC with TLS8080
: Alternative HTTP/2 port
light_service_host¶
Type: string
Default: "0.0.0.0"
Description: Bind address for the node’s local gRPC service
Details:
Service accessed by task containers
Provides LocalServicer and WorldServicer
Usually binds to all interfaces
Examples:
# Bind to all interfaces (default)
light_service_host = "0.0.0.0"
# Bind to localhost only
light_service_host = "127.0.0.1"
# Bind to specific interface
light_service_host = "192.168.1.100"
Security Considerations:
0.0.0.0
: Accessible from containers127.0.0.1
: Local only (may break container access)Specific IP: Restricted access
light_service_port¶
Type: integer
or null
Default: null
(auto-assigned)
Description: Port for the node’s local gRPC service
Details:
null
or0
: System assigns available portSpecific port: Fixed port binding
Port communicated to tasks via environment
Examples:
# Auto-assign port (recommended)
light_service_port = 0
light_service_port = null
# Fixed port
light_service_port = 50052
light_service_port = 8081
Port Assignment:
Auto-assignment prevents conflicts
Fixed ports useful for debugging
Tasks receive port via
LIGHT_SERVICE_PORT
env var
Network Patterns¶
Local Development¶
[network]
manager_host = "localhost"
manager_port = 50051
light_service_host = "0.0.0.0"
light_service_port = 0
Cloud Deployment¶
[network]
manager_host = "api.manta-platform.io"
manager_port = 443 # HTTPS/gRPC
light_service_host = "0.0.0.0"
light_service_port = 0
Edge Device¶
[network]
manager_host = "${EDGE_MANAGER_HOST}"
manager_port = 50051
light_service_host = "0.0.0.0"
light_service_port = 0
Container/Docker¶
[network]
manager_host = "host.docker.internal" # Docker Desktop
manager_port = 50051
light_service_host = "0.0.0.0"
light_service_port = 0
Connection Management¶
Connection Lifecycle¶
DNS Resolution: Resolve manager hostname
TCP Connection: Establish socket connection
gRPC Channel: Create gRPC communication channel
TLS Handshake: If security enabled
Registration: Send node registration request
Heartbeat: Maintain connection with periodic pings
Connection Resilience¶
The node implements automatic reconnection:
Exponential backoff on failures
Maximum retry attempts
Connection health monitoring
Automatic failover (if configured)
Network Requirements¶
Outbound connections:
Manager gRPC service (TCP)
MQTT broker (TCP, port 1883/8883)
Docker registry (HTTPS, port 443)
Inbound connections:
Light service from containers (TCP)
Health check endpoints (optional)
Troubleshooting¶
Connection Refused¶
Error: Failed to connect to manager at localhost:50051
Connection refused
Solutions:
Verify manager is running:
docker ps
Check correct host/port:
netstat -an | grep 50051
Test connectivity:
telnet localhost 50051
Check firewall rules:
iptables -L
DNS Resolution Failed¶
Error: Failed to resolve manager.manta.io
Solutions:
Check DNS:
nslookup manager.manta.io
Use IP address instead of hostname
Check /etc/hosts file
Verify network connectivity:
ping 8.8.8.8
Port Already in Use¶
Error: Failed to bind light service to port 50052
Address already in use
Solutions:
Use auto-assignment:
light_service_port = 0
Find process using port:
lsof -i :50052
Choose different port
Kill conflicting process
Container Cannot Connect¶
Error: Task cannot connect to light service
Solutions:
Use
0.0.0.0
for light_service_hostCheck Docker network mode
Verify port is exposed
Check container environment variables
Performance Tuning¶
Latency Optimization¶
For low-latency requirements:
[network]
# Use local manager
manager_host = "localhost"
# Reduce network hops
light_service_host = "0.0.0.0"
High-Throughput¶
For high data transfer:
[network]
# Use high-bandwidth connection
manager_host = "10.0.1.100" # Same subnet
# Optimize for throughput
light_service_host = "0.0.0.0"
Network Diagnostics¶
Test network performance:
# Test latency
ping -c 10 manager.manta.io
# Test bandwidth
iperf3 -c manager.manta.io
# Check route
traceroute manager.manta.io
# Monitor connections
netstat -an | grep ESTABLISHED
Security Considerations¶
Network Isolation¶
Firewall rules: Restrict access to necessary ports
Network segmentation: Use VLANs or subnets
Private networks: Use VPN for remote connections
IP whitelisting: Limit manager access
Secure Bindings¶
[network]
# Restrict light service access
light_service_host = "127.0.0.1" # Local only
# Or bind to specific interface
light_service_host = "192.168.1.100" # Internal network
Port Security¶
Use non-standard ports to avoid scanning
Enable port knocking if supported
Use TLS for all connections
Monitor for unauthorized access
Environment Variables¶
All network fields support environment variables:
# Set environment
export MANTA_MANAGER_HOST="api.manta.io"
export MANTA_MANAGER_PORT="443"
export LIGHT_SERVICE_HOST="0.0.0.0"
export LIGHT_SERVICE_PORT="0"
# Reference in config
[network]
manager_host = "${MANTA_MANAGER_HOST}"
manager_port = ${MANTA_MANAGER_PORT}
light_service_host = "${LIGHT_SERVICE_HOST}"
light_service_port = ${LIGHT_SERVICE_PORT}
Advanced Configurations¶
Multi-Manager Setup¶
For high availability (future feature):
[network]
manager_host = "manager1.manta.io"
manager_port = 50051
# Future: fallback managers
# fallback_managers = [
# "manager2.manta.io:50051",
# "manager3.manta.io:50051"
# ]
Proxy Configuration¶
For environments requiring proxy:
# Set proxy environment
export HTTP_PROXY="http://proxy:8080"
export HTTPS_PROXY="http://proxy:8080"
export NO_PROXY="localhost,127.0.0.1"
NAT Traversal¶
For nodes behind NAT:
[network]
# Manager should be publicly accessible
manager_host = "public-api.manta.io"
# Light service binds locally
light_service_host = "0.0.0.0"
See Also¶
MQTT Configuration - MQTT broker configuration
Security Configuration - TLS and security settings
Start Command - Starting nodes with network config
Network Configuration - Network troubleshooting guide