Skip to main content

Version: latest

Optimize Telemetry Data Transfer

The data plane (DP) periodically reports operational metrics to the control plane (CP) to enable centralized monitoring, alerting, and dashboard visualizations. This telemetry includes API traffic volumes, request latency, HTTP status codes, bandwidth, and connection counts in prometheus format.

By default, the DP reports telemetry data every 15 seconds with Gzip compression enabled. This guide explains how to configure the telemetry behavior, tune compression levels, and opt out if needed.

Telemetry Configuration

Configure telemetry settings in the data plane's config.yaml:

conf/config.yaml
api7ee:
telemetry:
# Whether to enable telemetry data reporting to the control plane
enable: true

# Time interval between telemetry reports (seconds)
interval: 15

# Maximum size of metrics data per report (bytes, default 32 MB)
max_metrics_size: 33554432

# Maximum batch size before compression (bytes, default 4 MB)
metrics_batch_size: 4194304

# Gzip compression level (-1 = library default, 0 = none, 1-9)
compression_level: -1

Compression Levels

Gzip compression reduces the network overhead of telemetry transfers. The compression level controls the trade-off between CPU usage and data size:

LevelDescriptionCharacteristics
-1Library defaultTypically level 6 (balanced)
0No compressionNo CPU overhead; largest data size
1Fastest compressionLowest CPU usage; lowest compression ratio
6Balanced compressionBest balance between CPU usage and compression ratio
9Maximum compressionHighest compression ratio; highest CPU usage

Performance Comparison

The following table shows example results from a test environment with 3600 routes:

MeasurementLevel 1Level 6Level 9
Original Metrics Size7.71 MB6.60 MB6.45 MB
Compressed Size0.22 MB0.16 MB0.12 MB
Compression Ratio97.10%97.54%97.98%
DP CPU Usage17.39%21.57%29.61%

For most deployments, the default level (-1, typically 6) provides a good balance. Consider level 1 if CPU resources are constrained, or level 9 if bandwidth is limited.

Disable Telemetry

To disable telemetry data transfer from the DP to the CP, set enable to false:

conf/config.yaml
api7ee:
telemetry:
enable: false

Restart or reload the gateway for the change to take effect.

Impacts of Disabling Telemetry

Disabling telemetry has significant operational impacts:

ImpactDetails
Loss of ObservabilityThe control plane will no longer receive performance metrics. Monitoring dashboards and alerting systems will not function.
Impaired OperationsTeams lose the ability to assess service health, plan capacity, and troubleshoot issues using centralized metrics.
Compliance RisksIndustry compliance requirements for system monitoring and auditing may not be met.

Only disable telemetry in special circumstances, such as isolated debugging environments.

note

This telemetry is internal DP-to-CP communication only. API7 Gateway does not send anonymous usage data or "phone home" to external services.

Additional Resources

API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2026. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation