Navigation

Billing

Overview

MongoDB Realm applications 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:

  • Realm Requests, which measures the number of requests that MongoDB Realm sends and receives from client applications and external services. Requests include function calls, trigger executions, and sync updates, but exclude user authentication.
  • Realm Compute, which measures the runtime and memory usage of all requests excluding sync and authentication.
  • Realm 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 MongoDB Realm sends to external services and client applications.

Track Your Usage

You can track an application’s usage for the current month from the application dashboard in the Realm UI.

Monthly Free Tier

All MongoDB Realm 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. Once the sum of all application usage in an organization exceeds a free tier usage threshold, Realm immediately begins to bill for any additional usage.

MongoDB Realm is free to use below the following monthly free tier thresholds:

Invoicing and Payment

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

See MongoDB Atlas Billing for more information.

Usage Types

Realm Requests

Realm counts the number of requests that an application receives and handles. Authentication provider requests do not count towards your monthly usage.

Requests are billed at a set rate for each request. There are three primary types of request:

  • 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, Realm 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 triggers responds to a user login.

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

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

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

    For more information on sync operations, see Realm Sync Protocol.

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

Formula: (Function Executions + Trigger Executions + GraphQL/Webhook 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)

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?

Realm 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?

Realm Compute

Realm 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)

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?

Realm Sync

Realm 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)

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?

Data Transfer

Realm 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

MongoDB Atlas Data Transfer

MongoDB Realm does not bill for data transfer to and from a linked MongoDB Atlas data source.

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?

Examples

Mobile Application

A group messaging application uses MongoDB Realm 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
Realm Requests
  • (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
Realm Sync
  • (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
Data Transfer
  • (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

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:

  • Realm Requests: 1,000,000 requests
  • Realm Sync: 2,500 hours
  • Data Transfer: 10 GB

Web Application

A hardware store uses a web application that allows customers to browse and order items online. The app uses Realm 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
Realm Requests
  • (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
Realm Compute
  • (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
Data Transfer
  • (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

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:

  • Realm Requests: 1,000,000 requests
  • Realm Compute: 7.82 hours
  • Data Transfer: 10 GB

Backend Application

A regional pizza chain uses MongoDB Realm 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
Realm Requests
  • (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
Realm Compute
  • (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
Data Transfer
  • (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

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:

  • Realm Requests: 1,000,000 requests
  • Realm Compute: 83.41 hours
  • Data Transfer: 4.92 GB