Navigation

Billing

Overview

MongoDB Stitch applications are billed monthly based on usage. Usage is measured across two dimensions: data transfer and compute.

Stitch is available for free beneath certain monthly usage thresholds. If usage of a particular dimension exceeds its threshold, further usage is calculated incrementally each day. Usage on the day that the threshold is exceeded is pro-rated based on the fraction that was under the threshold.

Pricing

  Data Transfer Compute
Free Tier 25 GB per month
1,000,000 executions per month
(up to 100,000 GB-s)
Additional Usage $0.50 per GB $0.000025 per GB-s

Usage

Data Transfer

Outgoing requests from MongoDB Stitch to client applications and external services are billed cumulatively based on the size of all requests in a given month.

The first 25 GB of data transfer per month are free. Data transfer usage is calculated daily and billing begins on the first day that this threshold is reached. The first day’s bill is pro-rated based on how much of the day’s usage exceeded the threshold.

Note

Requests sent by Stitch to MongoDB Atlas are not included in data transfer calculations.

Example

Billable Data Transfer = (Total Data Transfer) - (25 GB)

In the month of July (31 days), a particular Stitch app sends a total of 1.5 gigabytes per day of outgoing requests and responses to clients and external services. Additionally, the application inserts 5 gigabytes of data into a MongoDB Atlas cluster each day.

On July 17th, the application passes the free tier threshold in the middle of the day. To account for this, the bill for July 17th is pro-rated to include only the usage beyond the threshold on that day.

At the end of the month, the application has transferred a total of 46.5 GB of data and inserted 155 GB of data into MongoDB. Data transfer up to 25 GB is free and the data sent to MongoDB is billed separately, so the billable data transfer for July is 21.5 GB.

Compute

Stitch functions and webhooks are billed based on the cumulative compute time of all execrutions in a given month. Compute time is measured in Gigabyte-seconds (GB-s) and represents the product of memory usage and run time for each execution.

The memory usage of an execution is defined as the largest amount of memory used by any of the functions run during the execution. The run time of an execution is calculated by summing the run times for the following:

  • Execution of the main function or webhook
  • Checks against rules
  • Any auxiliary functions called from another function or a rule
  • Wait time, such as when awaiting the resolution of a promise

Compute time is free for the first 1 million executions or 100,000 GB-s of usage each month, whichever occurs first. Compute time is calculated daily and billing begins on the first day that either threshold is reached. The first day’s bill is pro-rated based on how much of the day’s usage exceeded the threshold.

Example

A particular Stitch application has three functions. The following table summarizes the usage of each function over the course of the month of April (30 days):

Function Executions Average Memory (GB) Average Run Time (seconds) Total Usage (GB-s)
someFunction 1,000,000 0.02 1.00 20,000
anotherFunction 1,000,000 0.05 0.40 20,000
someWebhook 2,000,000 0.25 4.00 2,000,000
Total per Month 4,000,000     2,040,000
Scenario: Computation Free Tier Limit Reached First
Billable Compute Time = (Total Compute Time) - (100,000 GB-s)

Assume that all functions are executed at a continuous rate over the course of the month. At the end of April 2nd, the application has the following usage:

Function Executions Compute Time (GB-s)
someFunction 66,666 1,333
anotherFunction 66,666 1,333
someWebhook 133,333 133,333
Cumulative Total 266,665 135,999

This usage exceeds the free tier threshold for compute time but not for number of executions. All additional compute time for the month beyond the 100,000 GB-s threshold will be billed. The bill for April 2nd is pro-rated to include only compute time beyond the threshold on that day.

At the end of the month, the billable compute time for each day is summed to get the total billable compute time: 1,940,000 GB-s.

Scenario: Execution Free Tier Limit Reached First
Billable Compute Time = (Total Compute Time) - (Compute Time of First Million Executions)

Assume that someFunction and anotherFunction are executed at a continuous rate over the course of the month. Additionally, assume that someWebhook is not implemented until April 16th but is run at a constant rate after implementation. At the end of April 15th, the application has the following usage:

Function Executions Compute Time (GB-s)
someFunction 500,000 10,000
anotherFunction 500,000 10,000
someWebhook 0 0
Cumulative Total 1,000,000 20,000

This usage exceeds the free tier threshold for number of executions but not for compute time. All compute time for the month beyond the 20,000 GB-s used in the first million exexcutions will be billed. The first execution beyond the threshold occurs the following morning, so billing begins on April 16th.

At the end of the month, the billable compute time for each day is summed to get the total billable compute time: 2,020,000 GB-s.

Invoicing and Payment

Stitch is billed as part of MongoDB Atlas. All payment methods that work with Atlas can be used to pay for Stitch, including Prepaid Atlas Credits. Any costs associated with a linked Atlas cluster, such as database operations and backup, are billed separately from Stitch.

See MongoDB Atlas Billing for more information.