How Billing Works
Bahriya charges based on the actual compute resources your containers consume, measured per hour, per region.
What you are billed for
Billing is based on two resources:
| Resource | Unit | Measured from |
| CPU | Millicore-hours | Your container's min CPU × replicas running |
| Memory | Gigabyte-hours | Your container's min memory × replicas running |
These are billed per region. A container running in 3 regions is billed 3× for the same resource configuration.
How usage is tracked
Bahriya tracks runtime periods — contiguous windows of time when your container is in the running state. A period opens when a successful deployment completes and closes when the container is redeployed, fails, or is deleted.
Every hour, a rollup job reads open runtime periods and writes a usage record for each completed hour bucket. This record captures:
- The resource (CPU or memory)
- The quantity consumed (millicores or GB)
- The unit price for that region class
- The total amount for that hour
Usage records are idempotent — if the rollup runs multiple times for the same hour, it will never double-count.
Autoscaling and billing
If autoscaling is disabled, you are billed for your configured min replicas at all times the container is running.
If autoscaling is enabled, billing is based on the minimum replica count (your guaranteed baseline). Burst usage above the baseline (additional replicas added by the autoscaler) will be metered separately in a future billing update.
Region class pricing
Each region has a class (standard or premium) that determines the per-unit price. Premium regions have higher infrastructure costs and therefore higher rates. You can see the region class on the pricing page and in the console.
Billing cycle
Usage accumulates hourly. Invoices are generated monthly and cover all usage within the billing period. The invoice includes a breakdown by container, region, and SKU (CPU and memory separately).
Pricing transparency
You can preview the estimated hourly cost of a container configuration on the pricing calculator before deploying. The estimate uses your chosen regions, CPU class, CPU and memory values, replica counts, and autoscaling settings to show a cost breakdown.