Skip to content
BataDB

DocsGet started

Pricing and billing

Rates, plans, the free allowance, spend caps and how usage is measured.

You pay for compute while it runs, for the storage you keep, and for data you send past the monthly allowance. This page lists the rates, what each plan includes, and how usage is measured.

Rates

WhatPriceHow it is measured
Compute$0.015 per CU-hourTo the millisecond, while a compute runs
Storage$0.25 per GB-monthEvery hour; each project is billed on its largest size in the month
Data transfer$0.08 per GBBytes sent to clients, past 500 GB a month

One CU (compute unit) is 0.25 vCPU and 512 MB of memory. Computes come in fixed sizes of 1, 2, 4, 8 and 16 CU, up to your plan's limit.

A 1 CU compute that runs all month (730 hours) comes to $10.95 before the free allowance. A serverless compute that sleeps most of the day costs a fraction of that, because a suspended compute costs nothing for compute.

Plans

FreePay as you goTeamEnterprise
Monthly fee$0$0$69Contact us
Compute included100 CU-hours100 CU-hours5,000 CU-hoursCustom
Storage included1 GB1 GB50 GBCustom
Transfer included500 GB500 GB500 GBCustom
Past the allowanceStopsBilled at the rates aboveBilled at the rates aboveCustom
Projects33No limitCustom
Branches per project55No limitCustom
Largest compute2 CU2 CU16 CUCustom
Always-on computesNoNoYesCustom

Pay as you go is the Free plan with the stop turned off: same allowance, same limits, and usage past the allowance is billed to your card.

Team is not self-serve yet. To move a team onto it, email kirby@zvndev.com. The same address handles Enterprise.

The free allowance

A Free team needs a card on file before any database can run. Until you add one, creating or starting a database fails with PAYMENT_METHOD_REQUIRED (HTTP 402) and a link where a person adds the card. Add it on the console's Billing page, or get a link with bata billing card add.

Nothing is charged while usage stays inside the allowance. By default a Free team stops at the allowance instead of billing you:

  • Once usage passes the allowance, the team's computes are suspended.
  • Waking one fails with SPEND_CAP_REACHED until the next billing month starts.
  • Your data stays where it is. Nothing is deleted.

To keep running past the allowance, turn on pay as you go:

Terminal
bata billing stop-at-limit off   # pay as you go
bata billing stop-at-limit on    # stop at the free allowance again
bata billing stop-at-limit       # show the current setting

The same switch is on the console's Billing page. Changing it needs an owner or admin of the team.

Spend cap

On pay as you go you can cap what you spend past the allowance:

Terminal
bata billing spend-cap --set 50   # cap at $50 a month
bata billing spend-cap --clear    # remove the cap

At 80% of the cap you get a warning. At 100% the team's computes are suspended and wakes fail with SPEND_CAP_REACHED until the next billing month, or until you raise the cap.

On pay as you go without a cap, you get a warning at 80% of any allowance and another when usage first goes past it. Warnings and other billing events show in the console and in bata billing events.

The $5 minimum

A month whose usage comes to less than $5 is not charged. The amount carries forward and is charged with the first month that brings the total to $5 or more. A plan's monthly fee is always charged in full. If your subscription ends, anything carried is charged on the final invoice.

Billing months

A billing month is a calendar month in UTC. Allowances reset on the 1st.

How usage is measured

  • Compute. A compute's size in CU times the time it runs, metered to the millisecond. A serverless compute suspends after 5 minutes without queries and costs nothing for compute while suspended. Every branch has its own compute, so an idle branch costs nothing for compute either.
  • Storage. Each project's size is sampled every hour. A project is billed on its largest size during the month, and the team's storage is the sum over its projects. A branch is copy-on-write, so it adds storage only as its data changes.
  • Data transfer. Bytes sent to your clients: query results over the pooled and direct endpoints, and responses from the HTTP SQL API. Data sent to BataDB is not counted.

Point-in-time history

Each project keeps a window of history for point-in-time restore: 1, 7, 14 or 30 days, 7 by default, on every plan. History is not metered yet. See or change the window with bata projects pitr.

Checking your bill

Terminal
bata usage            # this month, per dimension, with cost
bata billing history  # past months and invoices

A dimension that is not metered yet shows as not metered, never as a priced $0.