Skip to main content
Version: 3.9.x

Configuration Reference for API7 Gateway Control Plane

The API7 Gateway Control Plane is the central management component that stores configurations and coordinates with Data Plane (DP) nodes. It is composed of two services, each with its own configuration file:

  • Dashboard — serves the web UI and the Admin API. Configured via dashboard_conf/conf.yaml.
  • DP Manager — handles configuration synchronization and telemetry exchange with DP nodes. Configured via dp_manager_conf/conf.yaml.

Both files are mounted into their respective containers (or pods) at deployment time. This page documents the most common fields used in these configuration files, not an exhaustive schema. For full deployment instructions, see Deploy with Docker Compose or Deploy on Kubernetes.

Dashboard Configuration (dashboard_conf/conf.yaml)​

The Dashboard can expose both the web UI and the Admin API on any enabled listener; in production, use the TLS listener and disable the plain HTTP listener unless it is specifically needed. A typical configuration looks like:

dashboard_conf/conf.yaml
server:
listen:
disable: true # Disable the plain HTTP listener in production.
host: "0.0.0.0"
port: 7080
tls:
disable: false
host: "0.0.0.0"
port: 7443 # Admin API and HTTPS UI listener.
key_file: "" # Path to the TLS private key. Leave empty to use the built-in self-signed certificate.
cert_file: "" # Path to the TLS certificate.
status:
disable: false
host: "127.0.0.1"
port: 7081 # Health and readiness probes.

log:
level: warn # One of: debug, info, warn, error.
output: stderr # Application logs: stderr, stdout, or an absolute file path.
access_log: stdout # HTTP access logs: stdout, stderr, or an absolute file path.

database:
dsn: "postgres://api7ee:changeme@192.168.31.10:5432/api7ee"
# timeout: 5s (default)

session_options_config:
same_site: "lax" # SameSite cookie mode: lax, strict, or none.
secure: false # Set to true when serving the UI over HTTPS only.
max_age: 86400 # Session lifetime in seconds.

prometheus:
addr: "http://192.168.31.11:9090"
whitelist:
- "/api/v1/query_range"
- "/api/v1/query"
- "/api/v1/format_query"
- "/api/v1/series"
- "/api/v1/labels"
- "/api/v1/labels/.*/values"
# basic_auth:
# username: ""
# password: ""
# tls:
# server_name: ""
# insecure_skip_verify: false
# enable_client_cert: false
# key_file: ""
# cert_file: ""
# ca_file: ""

consumer_proxy:
enable: false
cache_success_count: 512
cache_success_ttl: 60
cache_failure_count: 512
cache_failure_ttl: 60

Field Reference​

FieldDescription
server.listenPlain HTTP listener for the Dashboard UI. Set disable: true and rely on the TLS listener in production.
server.tlsHTTPS listener that serves both the UI and the Admin API. Provide key_file and cert_file to use your own certificate; otherwise the Dashboard generates a self-signed certificate at startup.
server.statusEndpoint used by orchestrators for liveness and readiness probes.
log.levelLog verbosity. Use info or debug while troubleshooting.
log.outputDestination of application log messages. Set to an absolute path to write to a file.
log.access_logHTTP access log destination. Defaults to stdout; accepts stdout, stderr, or a file path.
database.dsnPostgreSQL connection string. The Dashboard automatically creates and migrates its schema on first start.
database.timeoutDeadline for each database operation in this process. Defaults to 5s. See Database operation timeout.
session_options_configControls the session cookie issued to UI users. Set secure: true when the UI is only reachable over HTTPS.
prometheus.addrURL of the Prometheus instance that the Dashboard queries to render analytics.
prometheus.whitelistRegex list of Prometheus query API paths the Dashboard is allowed to call.
prometheus.basic_auth / prometheus.tlsOptional authentication and TLS settings used when contacting Prometheus.
consumer_proxyEnables and tunes caching of consumer lookups proxied from DP nodes through the Control Plane.

Access logs are independent of log.level and log.output. Raising the application log level does not suppress HTTP access logs, and setting log.access_log to an empty string still writes to standard output. This setting selects a destination; it does not redact logged request data. If you choose a file, provide a writable directory and arrange collection and rotation. Restart the affected control-plane component after changing its configuration.

Database Operation Timeout​

The default database operation deadline is 5s. Configure it in the process configuration:

dashboard_conf/conf.yaml or dp_manager_conf/conf.yaml
database:
timeout: 5s

The Dashboard and DP Manager have independent values. Restart the process whose configuration you changed.

The ADC --timeout defaults to 10s per HTTP request and controls how long ADC waits for an Admin API response. It does not extend database.timeout or the Dashboard's separate 60-second request deadline.

If the Admin API returns HTTP 504 with The request exceeded the maximum allowed time limit, find the corresponding request timeouted entry and access log in the Dashboard logs. Compare the request duration with both server deadlines before changing either setting. A reverse proxy can also return its own HTTP 504 response. Investigate the slow operation before raising a deadline.

DP Manager Configuration (dp_manager_conf/conf.yaml)​

The DP Manager terminates the mTLS connection from each Data Plane node, distributes configuration updates, and ingests telemetry. A typical configuration looks like:

dp_manager_conf/conf.yaml
server:
listen:
host: "0.0.0.0"
port: 7900
tls:
host: "0.0.0.0"
port: 7943 # mTLS endpoint that Data Plane nodes connect to.
status:
disable: false
host: "127.0.0.1"
port: 7901

log:
level: warn
output: stderr
access_log: stdout

database:
dsn: "postgres://api7ee:changeme@192.168.31.10:5432/api7ee"
# timeout: 5s (default)

prometheus:
addr: "http://192.168.31.11:9090"
# basic_auth:
# username: ""
# password: ""
# tls:
# server_name: ""
# insecure_skip_verify: false
# enable_client_cert: false
# key_file: ""
# cert_file: ""
# ca_file: ""

rate_limit:
enable: false
time_window: 1 # Seconds over which count tokens are refilled.
count: 1000 # Bucket capacity and tokens refilled per window.

Field Reference​

FieldDescription
server.listenPlain HTTP listener used for internal traffic.
server.tlsTLS listener on port 7943 that Data Plane nodes connect to. The DP Manager presents its own certificate to each DP and validates the DP client certificate against the same trust chain. Certificates are managed by the Control Plane; issuance is automatic, but rotation is a manual operation — see Mutual TLS between CP and DP.
server.statusEndpoint used by orchestrators for liveness and readiness probes.
log.level, log.output, log.access_logSame semantics as the Dashboard.
database.dsnPostgreSQL connection string. Must point to the same database as the Dashboard.
database.timeoutDeadline for each database operation in the DP Manager process. Defaults to 5s and is independent of the Dashboard value.
prometheusPrometheus connection used to push DP-side telemetry. The basic_auth and tls blocks have the same shape as in the Dashboard configuration.
rate_limit.enableEnables process-local token buckets on consumer and developer lookup endpoints. Each endpoint has its own bucket, shared by all authenticated callers that reach the DP Manager process.
rate_limit.time_window, rate_limit.countcount is both the burst capacity and the number of tokens refilled evenly over time_window seconds. An exhausted bucket returns HTTP 429.

The two buckets apply only to GET /api/dataplane/consumer_query and GET /api/dataplane/developer_query. They do not limit configuration retrieval or watches under /v3, heartbeats, or telemetry. Each DP Manager process has independent in-memory buckets, so replicas do not share rate-limit state.

Next Steps​