I have a master/slaves architecture and would like to use a x*master/slaves architecture with x the number of shards.
I want to send writes only to masters (based on the shards it hosts) and the reads to slaves (using a VIP). I think I'll use something like that :
0 20 0
21 40 1
100 120 2
121 140 3
with shard 0 = master 1, shard 1 = master 2, shard 2 = vip to slaves of master 1, shard 3 = vip to slaves of master 2
Do you think it's the right way to do it ?
I have a question concerning the name used to describe shard_key "[%shard_key]" , If I use the following query SELECT * FROM t WHERE id = /*+ shard_val(1) */ ?'
will it work ? or must I use a [%id] section ? is the section [%shard_key] used when the [%column_name] section is not found ?