Run trigger over analytics node

Hi, I am trying to run some triggers over a DB that has an analytics node. I would like to force to use this node to not overload the primary and secondary ones. I have been researching on how to do it. But I did not find any information about it. Is it possible and how can I select this node on the context.services.get(…) function?

Thanks for all.

Hi @Christian_Jodra,

You can specify read preference tags on the data source to target your analytics nodes - https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/#procedure

This will be used for all operations on the data source, so if you want to use the analytics node for only a subset of operations you’ll want to create a separate data source and use that one in the context.services.get call.

1 Like

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