Active vs. Inactive Session Detection Protocols
2 min read
1. Overview & System Purpose #
The BEX Session Detection Engine continuously monitors gateway connections to distinguish between active user traffic and idle or background network activity. The primary goal of this architecture is to ensure fair credit accounting (specifically within the Flex and Gigify subscription models) by preventing background keep-alive packets or silent socket connections from incorrectly triggering session billing or active-day deductions.
2. Active Session Criteria #
A connection is classified as an Active Session when all of the following conditions are met:
- Cryptographic Handshake Completion: Successful establishment of the encrypted TUN/TAP tunnel using authorized Hardware IDs.
- Bi-directional Data Flow: Sustained throughput exceeding the minimum data threshold ($> 64\text{ KB/min}$) across the active data plane.
- Application Uptime Signal: Active network requests initiated by user-level processes (e.g., web browsing, media streaming, or encrypted API calls).
3. Inactive (Idle) Session Criteria #
A connection transitions to an Inactive / Idle Session state under the following conditions:
- Background Keep-Alive Phase: The client device enters system sleep or lock screen mode where only heartbeat pings are exchanged with the gateway node.
- Throughput Drop Threshold: Data transfer rates fall below $10\text{ KB/min}$ for a continuous period exceeding 15 minutes.
- Unresponsive Keep-Alive Timeout: Dead Peer Detection (DPD) protocols fail to receive acknowledgement packets after 3 consecutive retry attempts.
4. Session Detection Workflow #
- Initiation: The client requests a tunnel connection. The Control Plane validates authorization and logs the starting timestamp.
- Telemetry Sampling: Gateway nodes analyze throughput metrics at 30-second sampling intervals.
- Threshold Evaluation: If throughput remains above the active threshold, the session stays flagged as “Active”.
- State Transition: If throughput drops below the minimum threshold for 15 minutes, the Control Plane automatically marks the session as “Idle/Paused”.
- Credit Preservation: In idle state, time-based consumption meters are paused to prevent unnecessary plan drain.
5. Billing & Accounting Impact #
- Flex Subscription: Entering an idle state within an existing 24-hour active window does not cancel the current window, but prevents starting a new window prematurely after expiration.
- Gigify Subscription: Idle connections generate zero bandwidth metering events, guaranteeing that background heartbeats do not consume data quotas.
Updated on October 4, 2026
Premiume Subscription Lifecycle & Fixed Timeframe EngineControl vs. Data Plane Architecture: Decoupling Web Dashboard from Client Engine