Docs Menu

Docs HomeAtlas App Services

Billing

On this page

  • Overview
  • Monthly Free Tier
  • Invoicing and Payment
  • Usage Types
  • App Services Requests
  • App Services Compute
  • Atlas Device Sync
  • Data Transfer
  • Examples
  • Mobile Application
  • Web Application
  • Backend Application

Atlas App Services Apps are billed according to how much they're used on a monthly basis. There are four independently-measured usage types that determine how much you pay each month:

  • App Services Requests, which measures the number of requests that App Services sends and receives from client applications and external services. Requests include function calls, trigger executions, and sync updates, but exclude user authentication and blocked or invalid requests.

  • App Services Compute, which measures the runtime and memory usage of all requests excluding sync and authentication.

  • Atlas Device Sync, which measures the total amount of time in which a client application is actively syncing.

  • Data Transfer, which measures the amount of data that App Services sends to external services and client applications.

Note

Track Your Usage

You can track an application's usage for the current month from the application dashboard in the App Services UI.

All App Services Apps in a MongoDB Atlas project share a single monthly free tier. All usage below the free tier thresholds in a given month is not billed. As soon as a project exceeds any monthly free tier threshold, App Services starts billing for additional usage of any kind for that project.

App Services is free to use below the following monthly free tier thresholds:

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

See MongoDB Atlas Billing for more information.

App Services counts the number of requests that an application receives and handles. Requests are billed at a set rate for each request.

There are several types of requests:

  • Function Executions, such as when a user calls a function from a client app or when a function calls an external service. If an executing function calls another function, App Services considers both executions as part of the same request.

  • Trigger Executions, such as when a database trigger matches a change event, a scheduled trigger is configured to fire, or an authentication trigger responds to a user login. The request resulting from a trigger execution also includes all operations invoked by the trigger, including functions.

  • GraphQL Requests, such as when a client application issues a GraphQL query operation or calls a custom resolver.

  • HTTPS Requests, such as when an external service sends a notification event or interaction payload to an incoming webhook or HTTPS endpoint.

  • Sync Operations, such as when a sync client uploads a changeset, when App Services resolves a conflict in an uploaded changeset, or when App Services sends changesets to a connected sync client.

    For more information on sync operations, see Atlas Device Sync Protocol.

All incoming requests count toward your monthly usage except for the following:

  • Requests to an authentication provider

  • Requests blocked by an application's IP Access List

  • Requests to an invalid HTTP endpoint

Price: $2.00 / 1,000,000 requests ($0.000002 / request)

Formula: (Function Executions + Trigger Executions + GraphQL/Webhook/HTTPS Endpoint Requests + Sync Updates) * $0.000002

Free Tier Threshold: 1,000,000 requests or 500 hours of compute or 10,000 hours of sync runtime (whichever occurs first)

Example

Estimate Your Usage

Consider answering the following questions to help estimate the number of requests that your application will receive each month.

Triggers

  • How many times does this trigger execute each month?

Functions/GraphQL

  • How many requests do you receive each user session?

  • How many monthly active users does your app have?

  • How many sessions does an average user open each month?

Atlas Device Sync Requests

  • How many write operations do users issue each session?

  • How many updates do users receive each session?

  • How many devices or active users does your app have?

App Services counts the total amount of time and memory that each non-sync application request takes to process. Compute is billed at a set rate for each millisecond of runtime. For large requests, this rate is multiplied by a factor that reflects the amount of memory the request used.

The memory multiplier begins at 1 (i.e. it does not affect your billing rate) and increases by 1 for every 32MB of memory that a given request uses.

Price: $10.00 / 500 runtime hours (~$0.000000005 / ms)

Formula: (# Requests) * (Runtime (ms)) * (Memory (MB) / 32MB) * $0.000000005 / ms

Free Tier Threshold: 1,000,000 requests or 500 hours of compute or 10,000 hours of sync runtime (whichever occurs first)

Example

Estimate Your Usage

Consider answering the following questions to help estimate the amount of compute time that your application will use each month.

Runtime

  • How many sessions does a user open each month?

  • How many requests do you receive each session?

  • How long does each request take?

  • What does each request do?

  • How many requests do you make to MongoDB Atlas or another service?

  • Does a request handle heavy data processing?

Memory Usage

  • How much in-memory data does your application process for each request?

  • How many MongoDB documents does a request affect?

App Services counts the total amount of time in which a client application user has an active connection to the sync server even if they are not transferring data at the time. Sync is billed at a set rate for each millisecond of sync runtime per user.

Price: $0.08 / 1,000,000 runtime minutes ($0.00000008 / min)

Formula: (# Active Users) * (Sync time (min / user)) * ($0.00000008 / min)

Free Tier Threshold: 1,000,000 requests or 500 hours of compute or 10,000 hours of sync runtime (whichever occurs first)

Example

Estimate Your Usage

Consider answering the following questions to help estimate the amount of sync time that your application will use each month.

Sync Sessions

  • How many monthly active users does your app have?

  • How much time is an average user online each month?

App Services measures the total amount of data that your application sends out to client applications and external services. Data transfer is billed at a set rate for each gigabyte of data egress.

Price: $0.12 per GB

Formula: (Data sent to clients/services (GB)) * ($0.12 / GB)

Free Tier Threshold: 10GB

Note

MongoDB Atlas Data Transfer

Data transfer from a linked MongoDB Atlas data source to App Services is billed as an Atlas Data Egress charge. To learn more about Atlas egress rates, read the Data Transfer billing documentation.

Example

Estimate Your Usage

Consider answering the following questions to help estimate the amount of data that your application will transfer each month.

Data Transfer

  • How many updates/requests does an average user issues each month?

  • How much data is sent to users per update/request?

  • How often is data sent to external services?

  • How much data might be sent in each external service call?

A group messaging application uses App Services to manage permissions and sync messages between users in the same group. The app has the following usage:

  • There are around 2,000 active group chats in any given month.

  • The average group chat has 4 users that each send around 900 messages each month.

  • Messages are usually small but may contain up to 2KB of data.

  • The average user has the app open for about 9 hours each month.

The following calculations approximate the cost of running this application for one month:

Usage Type
Calculation
  • (2000 chats) * (4 users / chat) * (900 messages / user) = 7,200,000 messages

  • (7,200,000 messages) * ((1 write + 3 reads) / message) = 28,800,000 requests

  • (28,800,000 requests) - (1,000,000 free tier requests) = 27,800,000 requests

  • (27,800,000 requests) * ($0.000002 / request) = $55.60

  • (2000 chats) * (4 users / chat) * (9 hrs / user) = 72,000 active hrs

  • (72,000 active hrs) - (2,500 free tier hours) = 69,500 active hrs

  • (69,500 active hrs) * (60 mins / hr) * ($0.00000008 / min) = $0.33

  • (7,200,000 messages) * (3 reads / message) = 21,600,000 reads

  • (21,600,000 reads) * (0.000002 GB / read) = 43.2 GB

  • (43.2 GB) - (10 free tier GB) = 33.2 GB

  • (33.2 GB) * ($0.12 / GB) = $3.98

TOTAL
$55.60 (requests) + $0.33 (sync) + $3.98 (data transfer) = $59.91 / month

Note

Free Tier Usage

The way that free tier usage affects your bill depends on your consumption each month. For this example, we assume that all requests and activity are spread evenly throughout the month.

On every day of a 30 day month this application would handle 960,000 requests, 2,400 sync hours, and 1.44 GB of data transfer. The app would hit the requests/compute/sync threshold on the second day of the month and the data transfer threshold on the seventh day.

The free tier would cover the following usage in each area:

  • App Services Requests: 1,000,000 requests

  • Atlas Device Sync: 2,500 hours

  • Data Transfer: 10 GB

A hardware store uses a web application that allows customers to browse and order items online. The app uses Atlas Functions and the GraphQL API to fetch items based on a user's search, get detailed information for specific items, and submit orders. The app has the following usage:

  • There are around 100,000 visitors each month

  • An average visitor performs 2 searches, looks at 10 items, and submits an order 20% of the time.

  • Search results, item data, and order requests contain 4KB or less

The following calculations approximate the cost of running this application for one month:

Usage Type
Calculation
  • (2 searches + 10 items + 0.20 orders) / visitor = 12.2 requests / visitor

  • (12.2 requests / visitor) * (100,000 visitors) = 1,220,000 requests

  • (1,220,000 requests) - (1,000,000 free tier requests) = (220,000 requests)

  • (220,000 requests) * ($0.000002 / request) = $0.44

  • (100,000 visitors) * ((2 searches + 10 items + 0.20 orders) / visitor) = 1,220,000 requests

  • (1,220,000 requests) * (100 ms / request) * 1 = 122,000,000 ms

    • 100 ms is a conservative runtime estimate for lightweight functions

    • 4KB is well under 32MB, so the memory multiplier is 1

  • (122,000,000 ms) - (28,152,000 free tier ms) = 93,848,000 ms

  • (93,848,000 ms) * ($0.000000005 / ms) = $0.47

  • (1,220,000 requests) * (0.000002 GB / request) = 4.88 GB

  • (4.88 GB) - (10 free tier GB) = 0GB

  • (0GB) * ($0.12 / GB) = FREE

TOTAL
$0.44 (requests) + $0.47 (compute) + $0 (data transfer) = $0.91 / month

Note

Free Tier Usage

The way that free tier usage affects your bill depends on your consumption each month. For this example, we assume that all requests and activity are spread evenly throughout the month.

On every day of a 30 day month this application would handle 41,290 requests, 1.3 compute hours, and 16.8 GB of data transfer. The app would hit the requests/compute threshold on the 24th day of the month and the data transfer threshold on the first day.

The free tier would cover the following usage in each area:

  • App Services Requests: 1,000,000 requests

  • App Services Compute: 7.82 hours

  • Data Transfer: 10 GB

A regional pizza chain uses App Services to handle orders for all of its restaurants. The app has the following usage:

  • The chain has 25 stores and each store gets about 12,000 orders each month

  • For each order, a database trigger sends the customer an email receipt. Another trigger sends text message updates to the customer when their order is received, when it's sent out for delivery, and when it's about to be delivered.

  • A scheduled trigger runs every 5 minutes to monitor delivery times. If a delivery is taking too long, it sends a text message update to the user. About 10% of all deliveries take too long.

  • Orders vary in size but are no larger than 4KB

Usage Type
Calculation
  • (25 stores) * (12,000 orders / store) = 300,000 orders

  • (300,000 orders) * ((1 email + 3.10 texts) / order) = 1,230,000 requests

  • (12 triggers / hr) * (720 hrs / month) = 8,640 requests

  • (1,230,000 + 8,640 requests) - (1,000,000 free tier requests) = 238,640 requests

  • (238,640 requests) * ($0.000002 / request) = $0.48

  • (1,230,000 requests) * (300 ms / request) * 1 = 369,000,000 ms

    • 300 ms is a runtime estimate for the trigger function. To get a better estimate, create a POC function and test how long it takes to connect to external services, etc.

    • 4KB is well under 32MB, so the memory multiplier is 1

  • (369,000,000 ms) - (300,276,000 free tier ms) = 68,724,000 ms

  • (68,724,000 ms) * ($0.000000005 / ms) = $0.34

  • (1,230,000 requests) * (0.000004 GB / request) = 4.92 GB

  • (4.92 GB) - (10 free tier GB) = 0GB

  • (0GB) * ($0.12 / GB) = FREE

TOTAL
$0.48 (requests) + $0.34 (compute) + $0 (data transfer) = $0.82 / month

Note

Free Tier Usage

The way that free tier usage affects your bill depends on your consumption each month. For this example, we assume that all requests and activity are spread evenly throughout the month.

On every day of a 30 day month this application would handle 41,000 requests, 3.42 compute hours, and 0.164 GB of data transfer. The app would hit the requests/compute threshold on the 25th day of the month and would not exceed the data transfer free tier threshold.

The free tier would cover the following usage in each area:

  • App Services Requests: 1,000,000 requests

  • App Services Compute: 83.41 hours

  • Data Transfer: 4.92 GB

←  ReferenceFind Your Project or App ID →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.