You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recommend that the query exporter be set to readPreference "secondaryPreferred" by default, so that it generally reads from secondaries rather than the primary.
The advantage of this is that it avoids load on your primary DB. In particular, aggregation pipeline queries often seem to lock the DB collection and make other queries (i.e. from your application) artificially slow.
The main disadvantage of this is that your exported metrics may be subject to replication lag (usually less than 1 sec) vs. the state of the primary. Since the query exporter is typically used for passive stats exporting, this is generally acceptable in the vast majority of cases.
The text was updated successfully, but these errors were encountered:
I am not sure whether its a good idea to change the default behavior. What stops you from just changing the URI?
That said this is definitely worth documenting in the readme.
I recommend that the query exporter be set to readPreference "secondaryPreferred" by default, so that it generally reads from secondaries rather than the primary.
The advantage of this is that it avoids load on your primary DB. In particular, aggregation pipeline queries often seem to lock the DB collection and make other queries (i.e. from your application) artificially slow.
The main disadvantage of this is that your exported metrics may be subject to replication lag (usually less than 1 sec) vs. the state of the primary. Since the query exporter is typically used for passive stats exporting, this is generally acceptable in the vast majority of cases.
The text was updated successfully, but these errors were encountered: