Scaling Strategies (Vertical & Horizontal Architecture)
As video surveillance installations grow from dozens to thousands of camera streams, RUSEON Core supports both Vertical Scaling (Scale-Up) on high-density bare-metal hardware and Horizontal Scaling (Scale-Out) across distributed edge gateway clusters.
1. Vertical Scaling (Scale-Up) Best Practices
A single modern 12-to-16 core server can handle 600+ concurrent 1080p streams (18,000+ FPS) when optimized:
- NUMA Binding with
numactl: On dual-socket servers, bind the process to a single NUMA node to prevent cross-socket memory bus latency:bashnumactl --cpunodebind=0 --membind=0 /opt/ruseon/bin/ruseon -config /etc/ruseon/config.yaml - Dedicated Storage Tiering:
- BadgerDB (
./data): Place on dedicated NVMe SSD for microsecond LSM compaction. - Video Archive (
./recordings): Place on large sequential arrays (ZFS RAID-Z2 or hardware RAID 6).
- BadgerDB (
- Socket Receive Buffer Tuning: Set
net.core.rmem_max=33554432in/etc/sysctl.confto buffer network burst traffic.
2. Horizontal Scaling (Scale-Out) & Camera Sharding
For multi-building campuses, distributed retail chains, or smart city deployments exceeding 600 cameras:
- Camera Sharding: Assign camera groups to independent edge nodes based on physical location (e.g.
Node 1 = Building A,Node 2 = Building B). - Unified Ingress Proxy: Place an Nginx or HAProxy reverse proxy in front of the nodes, routing camera WHEP and HLS requests by camera ID prefix:nginx
location ~ ^/(stream|api)/(hls|webrtc|cameras)/(cam_bldgA_.*) { proxy_pass http://edge-node-1.internal:8080; } location ~ ^/(stream|api)/(hls|webrtc|cameras)/(cam_bldgB_.*) { proxy_pass http://edge-node-2.internal:8080; }