How to connect explicitly to analytics node if there are multiple analytics node?

Hi There,
We added Analytics node to handle the extra load on the atlas cluster. Initially we added one analytics node but faced the outage in analytics node. So we added two analytics node per MongoDB recommendation. So now we want to switch the traffic from one analytics node to second analytics node.
Can anyone suggest how to do that?


This is a good use case for replica set tags. See the tutorial how to set them up.

So you can setup a tag like {'usage':'analytics'} and then use that for the readPreferenceTags for the connection.



Thanks much and I was guessing this option.

1 Like

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