readPreferenceTag flexibility in Atlas
Looking to get more flexibility to target electable nodes and the workload isolation nodes. Some ideas are to allow for custom tags or having tags that allow for targeting read-only and electable nodes together. This allows for users use the read-only nodes to scale out reads along side the electable secondaries without having to juggle multiple connection strings.
Thanks that's helpful. Note that you can specify multiple tags in a read preference tag set, e.g. both "ELECTABLE" and "READ_ONLY" but it's true that the driver will use the first one in the list that it can reach meaning that unless you were to have some clients use one order and others use the reverse, you'd not distribute the workload across all available secondaries. We'll need to track these use cases and explore options over time.
Hi Andrew. I have a customer who uses secondaries to scale reads. They want to target only the secondaries and read-only secondaries, but NOT the analytics nodes. Using readPref=secondary would target ALL secondaries.
Can you share a little more detail on what you're aiming to achieve: For example why not use nearest or secondary read preferences?