Metering

How Drift measures resource consumption, and how to monitor and manage your usage.

Metered Metrics#

Drift collects usage data at 5-minute intervals for the following seven metrics:

MetricUnitDescription
StorageBytes (displayed as GB)Total persistent disk consumed by app slugs, service volumes, and user-created volumes.
MemoryBytes (displayed as GB)Sum of allocated RAM across all running containers in the organization.
CPU TimeSeconds (displayed as hours)Cumulative CPU time consumed by all containers. Idle containers consume near-zero CPU.
BandwidthBytes (displayed as GB)Total ingress and egress network transfer across all apps and services.
BackupsCount × sizeNumber of stored backup snapshots (automated and manual) weighted by their compressed size.
LogsBytes (displayed as GB)Retained log volume across all apps and services within the retention window.
Secrets & CertificatesCountTotal managed TLS certificates and environment secrets stored in the vault.

Metering by Broker Type#

Different process types are metered differently:

Broker TypeWhat's Metered
Web ProcessMemory allocated + CPU consumed while running. Bandwidth counted on ingress/egress.
Worker ProcessMemory allocated + CPU consumed. No bandwidth metering (internal only).
Cron JobCPU seconds consumed per execution. Memory counted only while the job is running.
Service (Database, Cache, etc.)Storage for persisted data + memory for the running instance + backup snapshots.

CLI Commands#

drift usage#

Show current billing-period usage for your organization:

$ drift usage

Organization: acme-corp    Plan: Team (CHF 99/mo)
Period: 2026-03-01 → 2026-03-31

Metric          Used        Included    %
─────────────────────────────────────────────
Storage         32.4 GB     50 GB       64.8%
Memory          12.1 GB     16 GB       75.6%
CPU Time        287 hrs     400 hrs     71.8%
Bandwidth       145 GB      200 GB      72.5%
Apps            38          50          76.0%
Services        22          50          44.0%

drift usage-history#

View historical usage for past billing periods:

$ drift usage-history --months 3

Period          Storage   Memory   CPU Time   Bandwidth   Overage
2026-01         41 GB     14 GB    310 hrs    180 GB      CHF 0.00
2026-02         45 GB     15 GB    380 hrs    195 GB      CHF 0.00
2026-03 (curr)  32 GB     12 GB    287 hrs    145 GB      CHF 0.00

When you hit 100 % of a plan limit, Drift requests consent before allowing overage. Approve or deny via the CLI:

$ drift overage-consent

Pending consent requests:
  Storage — projected overage: 8 GB (≈ CHF 3.20/mo)

Approve overage for storage? [y/N] y
✓ Overage consent granted for storage.

API Endpoints#

Access metering data programmatically via the Drift API. All endpoints require an organization-scoped API token.

MethodEndpointDescription
GET/v1/usageCurrent billing-period usage
GET/v1/usage/historyHistorical usage (query param: months)
GET/v1/usage/forecastEnd-of-month usage projection
GET/v1/overage/pendingList pending overage consent requests
POST/v1/overage/consentApprove or deny overage for a metric
Example: fetch current usage
curl -H "Authorization: Bearer $DRIFT_TOKEN" \
  https://api.drift.veloz.dev/v1/usage

Overage Consent Flow#

The following diagram shows how Drift handles usage that approaches and exceeds plan limits:

Usage rises
    │
    ▼
┌──────────────┐
│  80% of limit │──→  Warning email + CLI notification
└──────┬───────┘
       │
       ▼
┌──────────────┐     ┌─────────────────────┐
│ 100% of limit │──→  │ Consent requested    │
└──────┬───────┘     │ (email + CLI + dash) │
       │              └──────────┬──────────┘
       │                         │
       │              ┌──────────┴──────────┐
       │              ▼                     ▼
       │        ┌───────────┐        ┌─────────────┐
       │        │ Approved  │        │ No response  │
       │        └─────┬─────┘        │ within 48h   │
       │              │              └──────┬──────┘
       │              ▼                     ▼
       │        Overage billed       Workloads stopped
       │        at published rates   until consent or
       │                             plan upgrade

Grace period

The 48-hour grace period starts when the consent request is sent. During this time your workloads continue to run normally. Only after 48 hours without consent are non-essential workloads stopped.

See Billing & Plans → Plan Limits for the full limits table and overage pricing.