High availability and sizing
This page explains how Airgate’s services fit together when they run as several copies, what must be shared, and how to size a deployment. It is for architects and operators planning capacity and redundancy. Airgate Cloud is operated by Airowire; the on-premises appliance is a single virtual machine today.
Components
Section titled “Components” Switches, APs, controllers, firewalls RADIUS UDP 1812/1813 · RadSec TCP 2083 TACACS+ TCP 49 │ │ ▼ ▼ ┌──────────── FreeRADIUS ────────────┐ ┌──────────── nacd ─────────────┐ │ RADIUS, RadSec, EAP (PEAP, TTLS, │──►│ internal API: every policy │ │ EAP-TLS), credential cryptography │ │ decision │ └────────────────────────────────────┘ │ public HTTPS: console, API, │ │ portals, OCSP/CRL/SCEP, │ │ site connector API │ │ TACACS+ server, CoA client │ └───────────────┬───────────────┘ ▼ PostgreSQL (all state)- FreeRADIUS terminates RADIUS, RadSec and EAP and does the credential cryptography, but takes no policy decision. For every request it asks nacd which tenant, which policy, which account and which reply.
- nacd is the Airgate service: the policy engine, console and REST API, portals, certificate authority, TACACS+ server, CoA client and integrations.
- PostgreSQL holds all state. nacd replicas share nothing else.
Several nacd replicas
Section titled “Several nacd replicas”nacd runs as any number of identical replicas behind a load balancer for the public HTTPS listener, next to one or more FreeRADIUS instances. Each FreeRADIUS instance calls an nacd replica’s internal listener.
| Shared in PostgreSQL | Kept by each replica in memory (rebuilt from PostgreSQL) |
|---|---|
| All configuration, devices, sessions, Sign-in log records, audit log, certificate authorities and certificates, guest and profiling data | Policy snapshots, the network device table, directory caches, TACACS+ configuration, certificate-status caches, profiling rule sets |
| TACACS+ login cache, machine-authentication cache, CoA log, job queues | The in-process event bus; the cache of multi-round EAP conversations (an optimisation only: every step can be served without it) |
| Background jobs (retention and expiry sweeps, profiling polls, guest and certificate sweepers, device cleanup, webhooks) run on one replica at a time, under a database lock | Listeners: TACACS+ sessions, CoA sockets |
Replicas are interchangeable for the console and the API: tokens are signed bearer tokens, with no server-side session, so a load balancer needs no stickiness for HTTPS.
Event relay
Section titled “Event relay”When an administrator saves a change on one replica, the other replicas must drop their cached copy. nacd relays cache-invalidation events between replicas through PostgreSQL LISTEN / NOTIFY:
- Only cache-invalidation events are relayed (configuration changed, certificate revoked). Sign-ins, sessions, CoA and audit events are handled once, on the replica where they happen.
- Large events go through a database table instead of the notification.
- If the relay connection drops, the replica reconnects with backoff and, once connected again, drops all its caches, because notifications sent while it was disconnected are lost. If a burst of changes overflows the relay queue, the other replicas are told to drop all their caches too. No invalidation is lost silently.
GET /healthzon the public listener reports"event_relay": "connected","disconnected"or"off".
Set EVENT_RELAY=false only for a single replica. Give each replica a distinct NODE_ID (default: the host name) to tell them apart in logs.
Health checks for load balancers
Section titled “Health checks for load balancers”GET /healthz on the public listener answers 200 with {"status": "ok", "events_dropped": N, "event_relay": "…"} when nacd serves and its database answers within 2 seconds, and 503 with code db_unavailable otherwise. Use it as the load balancer’s health check.
FreeRADIUS and EAP affinity
Section titled “FreeRADIUS and EAP affinity”An EAP conversation (PEAP, EAP-TTLS, EAP-TLS) is a series of Access-Requests whose TLS state lives in one FreeRADIUS process. When you put several FreeRADIUS instances behind a load balancer:
- Keep each supplicant’s conversation on one instance: balance by source address and port, or by Calling-Station-Id.
- Network devices that fail over to another server address restart the conversation; the client simply authenticates again.
- A shared TLS session cache on shared storage lets clients resume quickly across instances.
nacd needs no affinity: every step of a conversation may be answered by a different nacd replica.
For RadSec (TCP 2083) the TLS connection itself keeps a network device on one instance.
Sizing the database connections
Section titled “Sizing the database connections”Each nacd replica keeps up to DB_MAX_CONNS pooled connections (default 64) plus one connection for the event relay. A one-off nacd command (such as a password reset) opens its own pool. Keep:
replicas × (DB_MAX_CONNS + 1) + one-off commands + maintenance < PostgreSQL max_connectionsThe metrics nac_db_pool_acquired_conns and nac_db_pool_empty_acquire_total show when a replica runs short of connections; see Metrics and monitoring.
Sizing the appliance
Section titled “Sizing the appliance”| Appliance | vCPU | Memory | Disk |
|---|---|---|---|
| Airgate appliance (default) | 4 | 8 GB | 60 GB, thin |
| Airgate Edge connector | 2 | 2 GB | 16 GB, thin |
The appliance runs the database, nacd and FreeRADIUS on one VM. Grow it with more vCPU and memory in vSphere when the metrics show sustained load:
rate(nac_radius_requests_total[5m])and thenac_radius_request_duration_secondshistogram for decision rate and latency;nac_radius_effects_queuedandnac_radius_effects_overflow_totalfor background work falling behind;- database pool metrics as above.
Disk use grows with the Sign-in log, accounting, packet captures (kept 24 hours) and the backups kept on the appliance (14 by default). Retention settings per tenant limit how long records are kept.
Redundancy options today
Section titled “Redundancy options today”| Deployment | Redundancy |
|---|---|
| Airgate Cloud | Operated and monitored by Airowire |
| Appliance | One VM. Use vSphere HA for host failures, VM snapshots before updates, and daily backups copied to an SFTP server so you can rebuild on a new VM with the same certificates |
| Sites | Configure a secondary RADIUS server on network devices where you have one. A site connector answers known MAB devices from its offline cache when Airgate cannot be reached |