I'd like to have an analytics replica in my setup, but I don't see how it's possible to have hidden and sharding, since mongos connects to the full replica set.
Hidden works in a single replica set situation, but when it's sharded, how can I connect to the hidden shards?
Unfortunately, it's not possible to query a hidden replica set member with a sharded cluster in the current production version of MongoDB (v 2.0.6).
In that version, the best that you can do is issue your queries with the 'SlaveOK' flag set. This will serve as a hint to 'mongos' that it can safely route your query to one of the secondary members of the replica set.
New support for "Read Tagging" is currently in development for the upcoming release of MongoDB. This is an extension of the existing support for "Write Tagging".
The current support for "Write Tagging" allows you to tag individual members of a Replica Set. Once you've done that, you can use special options on the Write Concern to specify which replica set members (actually, which tags) you'd like the write to be directed to.
The upcoming support for "Read Tagging" will extend this functionality to reads. Once your MongoDB driver has been extended to support "Read Tagging", you will be able to direct your read to a particular set of tagged replica set members, even when you're using a sharded cluster.
On Wednesday, July 11, 2012 8:36:31 AM UTC-7, Jeremy Wilson wrote:
> I'd like to have an analytics replica in my setup, but I don't see how > it's possible to have hidden and sharding, since mongos connects to the > full replica set.
> Hidden works in a single replica set situation, but when it's sharded, how > can I connect to the hidden shards?
On Thursday, July 12, 2012 11:39:51 PM UTC+2, William Zola wrote:
> Hi Jeremy!
> Unfortunately, it's not possible to query a hidden replica set member with > a sharded cluster in the current production version of MongoDB (v 2.0.6).
> In that version, the best that you can do is issue your queries with the > 'SlaveOK' flag set. This will serve as a hint to 'mongos' that it can > safely route your query to one of the secondary members of the replica > set.
> New support for "Read Tagging" is currently in development for the > upcoming release of MongoDB. This is an extension of the existing support > for "Write Tagging".
> The current support for "Write Tagging" allows you to tag individual > members of a Replica Set. Once you've done that, you can use special > options on the Write Concern to specify which replica set members > (actually, which tags) you'd like the write to be directed to.
> The upcoming support for "Read Tagging" will extend this functionality to > reads. Once your MongoDB driver has been extended to support "Read > Tagging", you will be able to direct your read to a particular set of > tagged replica set members, even when you're using a sharded cluster.
> Please feel free to add yourself as a follower on these issues.
> Let me know if you have further questions.
> -William
> On Wednesday, July 11, 2012 8:36:31 AM UTC-7, Jeremy Wilson wrote:
>> I'd like to have an analytics replica in my setup, but I don't see how >> it's possible to have hidden and sharding, since mongos connects to the >> full replica set.
>> Hidden works in a single replica set situation, but when it's sharded, >> how can I connect to the hidden shards?
On Friday, October 5, 2012 10:22:30 AM UTC-7, Shi Shei wrote:
> > you will be able to direct your read to a particular set of tagged > replica set members, even when you're using a sharded cluster.
> Is this true even for a hidden member (using v2.2.0)?
> On Thursday, July 12, 2012 11:39:51 PM UTC+2, William Zola wrote:
>> Hi Jeremy!
>> Unfortunately, it's not possible to query a hidden replica set member >> with a sharded cluster in the current production version of MongoDB (v >> 2.0.6).
>> In that version, the best that you can do is issue your queries with the >> 'SlaveOK' flag set. This will serve as a hint to 'mongos' that it can >> safely route your query to one of the secondary members of the replica >> set.
>> New support for "Read Tagging" is currently in development for the >> upcoming release of MongoDB. This is an extension of the existing support >> for "Write Tagging".
>> The current support for "Write Tagging" allows you to tag individual >> members of a Replica Set. Once you've done that, you can use special >> options on the Write Concern to specify which replica set members >> (actually, which tags) you'd like the write to be directed to.
>> The upcoming support for "Read Tagging" will extend this functionality to >> reads. Once your MongoDB driver has been extended to support "Read >> Tagging", you will be able to direct your read to a particular set of >> tagged replica set members, even when you're using a sharded cluster.
>> Please feel free to add yourself as a follower on these issues.
>> Let me know if you have further questions.
>> -William
>> On Wednesday, July 11, 2012 8:36:31 AM UTC-7, Jeremy Wilson wrote:
>>> I'd like to have an analytics replica in my setup, but I don't see how >>> it's possible to have hidden and sharding, since mongos connects to the >>> full replica set.
>>> Hidden works in a single replica set situation, but when it's sharded, >>> how can I connect to the hidden shards?
Thanks William! However, this means that hidden members are nearly useless in a sharded system since they can't be reached going through mongos. They could only be of use when connected directly to them but I don't see many use cases for this. You could hide the member perhaps for redundancy reasons or making backups.
On Saturday, October 6, 2012 5:11:42 AM UTC+2, William Zola wrote:
> Using 2.2.0, you cannot direct reads from a sharded cluster to go to a > hidden member.
> What you *can* do in 2.2.0 is to tag a particular set of nodes with a > particular tag, and direct a read to only go to those nodes.
> -William
> On Friday, October 5, 2012 10:22:30 AM UTC-7, Shi Shei wrote:
>> > you will be able to direct your read to a particular set of tagged >> replica set members, even when you're using a sharded cluster.
>> Is this true even for a hidden member (using v2.2.0)?
>> On Thursday, July 12, 2012 11:39:51 PM UTC+2, William Zola wrote:
>>> Hi Jeremy!
>>> Unfortunately, it's not possible to query a hidden replica set member >>> with a sharded cluster in the current production version of MongoDB (v >>> 2.0.6).
>>> In that version, the best that you can do is issue your queries with the >>> 'SlaveOK' flag set. This will serve as a hint to 'mongos' that it can >>> safely route your query to one of the secondary members of the replica >>> set.
>>> New support for "Read Tagging" is currently in development for the >>> upcoming release of MongoDB. This is an extension of the existing support >>> for "Write Tagging".
>>> The current support for "Write Tagging" allows you to tag individual >>> members of a Replica Set. Once you've done that, you can use special >>> options on the Write Concern to specify which replica set members >>> (actually, which tags) you'd like the write to be directed to.
>>> The upcoming support for "Read Tagging" will extend this functionality >>> to reads. Once your MongoDB driver has been extended to support "Read >>> Tagging", you will be able to direct your read to a particular set of >>> tagged replica set members, even when you're using a sharded cluster.
>>> Please feel free to add yourself as a follower on these issues.
>>> Let me know if you have further questions.
>>> -William
>>> On Wednesday, July 11, 2012 8:36:31 AM UTC-7, Jeremy Wilson wrote:
>>>> I'd like to have an analytics replica in my setup, but I don't see how >>>> it's possible to have hidden and sharding, since mongos connects to the >>>> full replica set.
>>>> Hidden works in a single replica set situation, but when it's sharded, >>>> how can I connect to the hidden shards?
On Tuesday, October 9, 2012 7:42:14 AM UTC-7, Shi Shei wrote:
> Thanks William! > However, this means that hidden members are nearly useless in a sharded > system since they can't be reached going through mongos. > They could only be of use when connected directly to them but I don't see > many use cases for this. You could hide the member perhaps for redundancy > reasons or making backups.
> On Saturday, October 6, 2012 5:11:42 AM UTC+2, William Zola wrote:
>> Using 2.2.0, you cannot direct reads from a sharded cluster to go to a >> hidden member.
>> What you *can* do in 2.2.0 is to tag a particular set of nodes with a >> particular tag, and direct a read to only go to those nodes.
>> -William
>> On Friday, October 5, 2012 10:22:30 AM UTC-7, Shi Shei wrote:
>>> > you will be able to direct your read to a particular set of tagged >>> replica set members, even when you're using a sharded cluster.
>>> Is this true even for a hidden member (using v2.2.0)?
>>> On Thursday, July 12, 2012 11:39:51 PM UTC+2, William Zola wrote:
>>>> Hi Jeremy!
>>>> Unfortunately, it's not possible to query a hidden replica set member >>>> with a sharded cluster in the current production version of MongoDB (v >>>> 2.0.6).
>>>> In that version, the best that you can do is issue your queries with >>>> the 'SlaveOK' flag set. This will serve as a hint to 'mongos' that it can >>>> safely route your query to one of the secondary members of the replica >>>> set.
>>>> New support for "Read Tagging" is currently in development for the >>>> upcoming release of MongoDB. This is an extension of the existing support >>>> for "Write Tagging".
>>>> The current support for "Write Tagging" allows you to tag individual >>>> members of a Replica Set. Once you've done that, you can use special >>>> options on the Write Concern to specify which replica set members >>>> (actually, which tags) you'd like the write to be directed to.
>>>> The upcoming support for "Read Tagging" will extend this functionality >>>> to reads. Once your MongoDB driver has been extended to support "Read >>>> Tagging", you will be able to direct your read to a particular set of >>>> tagged replica set members, even when you're using a sharded cluster.
>>>> Please feel free to add yourself as a follower on these issues.
>>>> Let me know if you have further questions.
>>>> -William
>>>> On Wednesday, July 11, 2012 8:36:31 AM UTC-7, Jeremy Wilson wrote:
>>>>> I'd like to have an analytics replica in my setup, but I don't see how >>>>> it's possible to have hidden and sharding, since mongos connects to the >>>>> full replica set.
>>>>> Hidden works in a single replica set situation, but when it's sharded, >>>>> how can I connect to the hidden shards?