Countly Edge Server

Availability

Countly Edge Server is available in Countly Enterprise and is included as part of the standard Enterprise plan. 

The Countly Edge Server is a lightweight analytics server designed for environments with limited or unavailable internet connectivity. It acts as a local data collection node that receives analytics requests from Countly SDKs, stores them locally, and synchronizes the data with the central Countly server once a connection becomes available. This architecture enables analytics collection in offline or edge environments while maintaining compatibility with the standard Countly SDK data flow.

Key Features

  • Edge Data Collection
    Collect analytics events locally from devices using Countly SDKs.

  • Offline Operation
    Fully operational without a continuous internet connection. 

  • Automatic Synchronization
    Periodically syncs with the main Countly server when available.

  • Request Batching
    Batch multiple requests to reduce network overhead and improve synchronization efficiency.

  • Statistics Dashboard
    Monitor Edge Server activity, synchronization status, and request processing metrics.

  • Import/Export Tools
    Migrate or back up data via manual tools when needed.

Typical Use Cases

  • Vehicle-Based Data Collection
    Edge servers deployed in vehicles can collect analytics data during operation and synchronize with the central server when connectivity becomes available.

  • Remote or Intermittent Connectivity
    Suitable for environments where continuous connectivity cannot be guaranteed, such as:  Mining sites, Maritime environments, Rural deployments. Data is stored locally and synchronized when the connection is restored.

  • Manual Data Handling
    In isolated environments, analytics data can be exported and physically transferred to another system (for example, via removable storage).

Statistics Dashboard

The Edge Server includes a monitoring dashboard available at: 

http://localhost:3000/stats-dashboard/stats.html

Overview section

The Overview section displays general server statistics, including:

  • Total requests received from SDKs

  • Records inserted into the local database

  • Connectivity status with the main Countly server

  • Server ping success rate

The dashboard also visualizes request flow over time. The dashboard interface includes metrics such as Received Requests, Inserted Records, Server Pings, and Data Sent.
 

Real-time Metrics

The Real-time Metrics section displays synchronization performance indicators, including:

  • Ping success rate

  • Data sending success rate

  • Number of ping errors

  • Number of send errors

It also lists the most recent synchronization errors and their causes. 

Historical Data

The Historical Data section provides historical trends of Edge Server activity, including:

  • Requests received

  • Records inserted

  • Records synchronized with the main server

These metrics help identify synchronization performance over time. 

Recent requests

The Recent Requests section lists the most recent analytics requests received from Countly SDKs.

For each request, the dashboard displays:

  • Request ID

  • Timestamp

  • HTTP method

  • Device ID

  • Application key

  • Request payload

This section helps verify that the Edge Server is correctly receiving SDK traffic.

Installation and Setup

The Edge Server can be deployed using Docker.

Using DockerUsing Docker Compose
docker run -d \ 
  --name countly-edge \ 
  -p 3000:3000 \ 
  -v countly-data:/data/countly \ 
  -e COUNTLY_SERVER=https://your.countly.server \ 
  us-docker.pkg.dev/countly-01/edge/server:latest

Configuration

Countly Edge server is configured through environment variables:

Variable Description Default
NODE_ENV Environment mode production
PORT Server port 3000
DATA_DIR SQLite database location countly
COUNTLY_SERVER Main Countly server URL https://try.count.ly
CONNECTION_TIMEOUT Request timeout in ms 10000
SYNC_INTERVAL Data sync interval in ms 5000
STATS_INTERVAL Stats logging interval in ms 60000
BATCH_SIZE Records to process per sync 10
PING_INTERVAL Interval between server pings in ms 30000
STATS_RETENTION_DAYS Number of days to keep statistics data 30
ENABLE_BATCHING Enable/disable request batching true

These variables control synchronization frequency, batching behavior, and monitoring intervals.

Was this page helpful?
Reach out to us for any other questions.
Helpful?

Looking for more Help?