Skip to main content

Platform Architecture

SecureLink V2 is a multi-tenant SD-WAN management platform that orchestrates network configuration across distributed edge devices. This page describes the core components, how they communicate, and how data flows through the system.

Components

ComponentRole
VSM Web UIReact single-page application. Provides the management dashboard for all device types, configuration, monitoring, and user management.
VSM APINode.js backend (Hono framework, Drizzle ORM). Serves the REST API, builds batch configurations, processes MQTT messages, and manages all persistent state.
MySQLPrimary datastore. Holds device inventory, configuration state, user accounts, tenant data, peering topologies, and feature flags.
EMQX (MQTT Broker)Message broker for all communication between the orchestrator and edge devices. Uses mutual TLS (mTLS) for authentication after bootstrap.
Edge AgentGo-based agent running on dedicated edge devices. Receives batch configuration over MQTT, applies it directly to VPP via the Binary API and CLI, and reports status back. Configuration state is persisted to a local SQLite database.
VPPVector Packet Processing — the high-performance data plane on edge devices. Handles routing, NAT, ACLs, WireGuard tunnels, and traffic monitoring.
MTGE AgentSame codebase as the Edge Agent, running in multi-tenant mode (EDGE_MODE=mtge). Manages per-tenant VRF isolation, per-tenant MQTT topics, and shared VPP resources.
Connector AgentLightweight Go agent using Linux networking (no VPP). Handles WireGuard, static routes, NAT, and ACLs via standard kernel tools.
VictoriaMetricsTime-series database for metrics. Receives edge telemetry (CPU, memory, interface stats, IPFIX flow data) and serves PromQL queries.
LokiLog aggregation system. Collects container logs via Promtail and serves LogQL queries for the monitoring dashboard.
GrafanaVisualization layer. Queries VictoriaMetrics and Loki to render dashboards, charts, and alerts.
KeycloakIdentity provider (OAuth2/OIDC). Handles user authentication (credentials). Authorization is handled separately by the VSM API via session tokens.
Global VSAOptional multi-orchestrator management plane. Controls feature flags per tenant, collects usage metrics, and generates billing reports.

Communication Paths

The system has two primary communication directions:

Southbound (Orchestrator to Edge)

Configuration flows from the UI down to the network data plane:

  1. The administrator makes a change in the Web UI (e.g., adds a WireGuard peer)
  2. The UI sends a REST API call to the VSM API
  3. The API writes the desired state to MySQL and marks the edge configuration as "dirty"
  4. When a sync is triggered, the API builds a complete batch configuration message
  5. The batch is published to the edge's MQTT topic
  6. The edge agent receives it, applies changes directly to VPP via the Binary API and CLI, and persists state to SQLite
  7. The agent sends a confirmation back over MQTT

Northbound (Edge to Orchestrator)

Telemetry, status, and confirmations flow from the edge up to the orchestrator:

  1. Edge agents periodically send inform messages (every 60s) with VPP interface statistics
  2. Connectors send keepalive messages (every 30s)
  3. After applying configuration, agents send confirmation messages with the applied config hash
  4. Metrics are forwarded to VictoriaMetrics; logs flow to Loki via Promtail
  5. The API updates MySQL (last seen time, WAN IP, sync status) and the Web UI reflects the current state

Device Type Comparison

SecureLink supports three device types, each suited to different deployment scenarios:

CapabilityDedicated EdgeMTGE (Shared Gateway)Connector
Data planeVPP (DPDK or AF_PACKET)VPP (DPDK or AF_PACKET)Linux kernel
TenancySingle tenantMulti-tenant (VRF isolation)Single tenant
WireGuard tunnelswg0 (IoT), wg1 (Apps), wg2/wg3 (Peering)Per-tenant wg0, wg1, wg2/wg3wg0 (hub connection), wg1 (E2E peering)
App VPN protocolsWireGuard or IKEv2Per-tenant WireGuard or IKEv2Not applicable
RoutingStatic + BGP/BFD (Bird)Per-tenant static + BGP/BFDStatic only
NATNAT44-EI via VPPPer-tenant NAT44-EIiptables masquerade
ACLsVPP ACL pluginPer-tenant VPP ACLsiptables rules
Traffic inspectionSuricata (optional)Per-tenant SuricataNot available
IPFIX flowsFlowprobe + edge-side collectionPer-tenant flowprobeNot available
Edge peeringFull mesh, hub-spoke, partial meshCan participate as peering memberSingle tunnel (WireGuard or IPSec)
Config deliveryVSR/{serial}/batchVSR/{serial}/batch/{tenantId}VSR/{serial}/batch
State persistenceSQLite (/var/lib/edge-agent/state.db)SQLiteFilesystem
Typical deploymentCustomer site, data centerCo-location, shared facilityBranch office, cloud VPC

Data Stores

StoreContentsAccessed By
MySQLDevice inventory, configuration state, user accounts, tenant data, peering topologies, feature flags, session tokensVSM API (read/write)
SQLite (edge-local)Configuration state (desired, actual, status, retry count), sync state, config audit log. The agent is the sole VPP controller — it reads and writes state directly.Edge Agent
VictoriaMetricsTime-series metrics — CPU, memory, interface counters, IPFIX flow aggregates, uptimeVSM API (query via PromQL), Grafana
LokiStructured logs from Docker containers on the orchestrator and edge devicesVSM API (query via LogQL), Grafana

Further Reading