Ch 3 : Resource allocation part 3

Hello,

It mentions when using BI tools or Informatica jobs, we should create the index on secondary which is a fair option.
But how we can handle the scenarios where we have 1 primary and 2 secondary but primary server is not fixed and anyone of the 3 servers can be primary and other 2 secondary?

Thank you!

https://docs.mongodb.com/manual/tutorial/configure-secondary-only-replica-set-member/

@santosh_41402

You can also use the read preference options documented here to make sure you are reading from a secondary.

Thank you David and Steve.

I am aware of the read preference concept but my question is : If I will create the index on secondary alone but let’s assume it will become primary. So in that scenario my indexes are now on primary and it kind of confusing since the indexes created for the Informatica jobs in secondary will be available in all the servers. Hence the statement which says “Index creation on secondary server only for BI tool.” is creating the confusion to me.

@santosh_41402

As @steevej-1495 points out, you can force your secondary to NEVER become a primary, so you don’t have to worry about that if you need the secondary only.