Cost Management

Set spending limits on jobs and pipelines, in USD or DVUs.

Limits cap how much your data collection can spend. Set them on a job (per run, per month, or both) or on a pipeline (per day, per month, or both), as a dollar amount or a number of DVUs. When a limit is reached, collection stops, so there are no surprises on your bill.

📘

Limits are yours to set

Limits are safeguards you define. They don't change your rates or how you're billed. You're always billed for actual usage, and a limit only stops a job from using more than you allow.

Cost limits and DVU limits

Each limit is set in one of two units:

  • Cost (USD): a dollar amount, calculated at your account's rates. Use this when you manage to a budget.
  • DVU: a number of Data Volume Units. Use this when you want to control volume, independent of price.

Each limit uses one unit: pick either Cost (USD) or DVU. Cost limits accept decimals (for example 1.5). DVU limits accept whole numbers only.

Run limits and monthly limits

  • Run limit: caps what a single run of the job can spend. In the Portal this is the Job Limit.
  • Monthly limit: caps what a periodic job can spend across all its runs in a month. It resets at midnight UTC on the 1st of each month.

You can use both together. For example, a periodic job could have a run limit of 50 DVUs and a monthly limit of 1,000 DVUs.

Setting limits in the Portal

In the New Job form:

  1. Job Limit Type: choose None, DVU or Cost (USD), then enter the value in Job Limit DVU's (whole number) or Job Limit Cost (USD) (decimal). This is the run limit, sent as run_limit in the API.
  2. Monthly Job Limit Type: shown when Job Type is Periodic. Choose None, DVU or Cost (USD), then enter the value. This is sent as monthly_limit in the API.

Select {} Code in the form to see the matching API request.

Changes to a job's limits take effect on its next run.

Setting limits with the Jobs API

Add run_limit, monthly_limit or both to the job body. See Creating Jobs via Jobs API.

"run_limit": {
  "dvu": 50
},
"monthly_limit": {
  "cost": 100.00
}

How limits are enforced

  1. Estimate. Before any action that has a cost, such as collecting documents, Datastreamer estimates the maximum cost of that action, based on the most new documents and requests it could use.
  2. Check and reserve. The estimate is checked against the job's remaining limit. This takes into account usage already confirmed and amounts reserved by other actions that are running for the same job.
    • If there's enough limit left, the estimate is reserved and the action runs.
    • If there isn't, the job stops before the action runs.
  3. Confirm. When the action finishes, the actual usage is recorded and any unused part of the reservation is released.
  4. Release on failure. If the action fails, the whole reservation is released.

A reservation is a temporary hold, not a charge. Because the check uses an estimate, a job can stop slightly before it reaches its limit.

When a limit is reached

  • Job limit: the job fails at the point where the remaining limit isn't enough for its next action. Documents collected up to that point are kept. You can retry the job, but depending on the data source, retrying can add cost.
  • Pipeline limit: the pipeline's jobs pause. See Pipeline limits.

Changing limits

  • Job limits: changes take effect on the job's next run.
  • Pipeline limits: changes take effect when the pipeline is deployed.
  • Lowering a limit doesn't stop work already in progress that the old limit allowed. For example, if a limit is 10 DVUs and a job starts an action that needs 6, then you lower the limit to 5, that action may still complete, depending on how far along it is.

Limits and Max Documents

Max Documents and limits work well together:

  • Max Documents caps how many documents a job ingests. It's a soft cap, so a job may slightly exceed it depending on how many documents a provider returns per request.
  • Limits cap what a job spends, in dollars or DVUs, and include job runs as well as documents.

Pipeline limits

Pipeline limits cap what all the jobs in a pipeline can spend together, and are available on every pipeline. Like job limits, they're safeguards you set, and they don't change your rates or billing.

  • Daily limit: caps total spend across the pipeline's jobs in a day. Resets at midnight UTC.
  • Monthly limit: caps total spend across the pipeline's jobs in a month. Resets at midnight UTC on the 1st of each month.
  • Set each one as No Limit, DVU or Cost (USD).

To set pipeline limits in the Portal:

  1. Open your pipeline and select Edit.
  2. Select Cost Limits.
  3. Choose a Daily Limit Type and enter the Daily Limit, and/or choose a Monthly Limit Type and enter the Monthly Limit.
  4. Select Done, then Save the pipeline.

Changes to pipeline limits take effect when the pipeline is deployed.

When a pipeline limit is reached: the pipeline's jobs pause. They don't restart on their own when the day or month resets, so you need to resume them.

Coming soon: organization limits

A monthly limit across your whole account, shown on your billing screen.


Did this page help you?