How many triggers are available at each tier level

I ideally need to use database triggers within an application. I am currently running an M2 cluster and I believe that the limit here is 10 triggers (which won’t be enough)
I’m struggling to find information about how many triggers are available at each tier level from M2 upwards.

Could someone provide this information?

Thanks!

Hey Thomas, welcome to the forums! :wave:

M2 clusters can have a maximum of 10 open change streams at any given time. You can check out the Change Stream limitations section in the docs to get specific numbers for each cluster size as well as a bit more info on when Realm opens change streams.

There isn’t a hard cap on the number of triggers per se but rather a limit on the number of open change streams at any given time. This limit applies across all features in your app that use change streams (i.e. database triggers, Realm sync, or collection.watch() calls) so I can’t say one way or the other if you’d hit the limit without knowing more about your app.

Realm will open one change stream per collection to serve all the triggers on that collection - that means you could have 50+ triggers on a single collection with no problem but would run into limits if you created triggers on many collections or were syncing a bunch of different Realm object types.

Hope this helps! Let me know if you still have any questions :slight_smile:

2 Likes

Thank you for pointing me to the correct area of the documentation.

That is very helpful and has answered my question in full.

Thank you.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.