Docs Menu

Triggers Overview

On this page

  • Trigger Types
  • Limitations
  • App Services Function Constraints Apply
  • Maximum Executions Per Second
  • Number of Triggers Cannot Exceed Available Change Streams

App Services Triggers execute application and database logic. Triggers can respond to events or use pre-defined schedules.

Triggers listen for events of a configured type. Each Trigger links to a specific App Services Function. When a Trigger observes an event that matches your configuration, it "fires." The Trigger passes this event object as the argument to its linked Function.

A Trigger might fire on:

  • A specific operation type in a given Collection.
  • An authentication event, such as user creation or deletion.
  • A scheduled time.

App Services keeps track of the latest execution time for each Trigger.

Atlas App Services supports three types of triggers:

Triggers invoke App Services Functions. This means they have the same constraints as all App Services Functions.

Learn more about App Services Function constraints.

Atlas App Services limits the execution of Trigger Functions. A Trigger can execute up to 2500 times per second. When a Trigger calls a Function, this call goes into a queue. When capacity becomes available, App Services executes the Function call.


Your application's execution rate may be lower than 2500 per second. This varies depending on your Atlas instance size.

Database Triggers with event ordering work differently. Each ordered Trigger processes events in sequence. App Services waits for each event execution in the sequence to complete. Then, it handles the next event. Only one sequence for a given ordered Trigger executes at a time.

Atlas App Services limits the total number of Database Triggers. The size of your Atlas cluster drives this limit.

Each Atlas cluster tier has a maximum number of supported change streams. A Database Trigger requires its own change stream. Other App Services services also use change streams, such as Atlas Device Sync. Database Triggers may not exceed the number of available change streams.

Learn more about the number of supported change streams for MongoDB Atlas tiers.

←  TriggersDatabase Triggers →
Give Feedback
© 2022 MongoDB, Inc.


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