Shard edge server
Shard edge server simplifies the administration of large shard cluster when shard cluster is only used for shard query functionality.
If you do not require automatic data partitioning, then you can designate one or more servers as shard edge servers so that you only need to define Enterprise replication at the shard coordinator server. Shard edge servers are standard Informix servers and you cannot start shard query from shard edge server.
Use the SHARD_EDGE_NODE configuration parameter to enable shard server as a edge server. For more information, see SHARD_EDGE_NODE configuration parameter.
Example
This example shows how to configure shard cluster between three servers: server1, server2 and server3. We will make server1 as our shard coordinator and server2 and server3 as shard edge servers.
1. Configure SQLHOSTS
group1 group - - i=1
server1 onsoctcp host1 10000 g=group1
group2 group - - i=2
server2 onsoctcp host2 10000 g=group2
group3 group - - i=3
server3 onsoctcp host3 10000 g=group3
SQLHOSTS file for server2:
server2 onsoctcp host2 10000
server1 onsoctcp host1 10000
SQLHOSTS file for server3:
server3 onsoctcp host3 10000
server1 onsoctcp host1 10000
2. Establish trusted host relationship between server1 and server2, and between server1 and server3
cdr define server —connect server -I group1
4. Update server2 and server3 config file to set SHARD_EDGE_NODE config value to 1
5. For parallel shard query function, make sure to set unique value to SHARD_ID config parameter at server1, server2 and server3
cdr define shardCollection —connect server1 customer_shard stores_demo:usr1.sales_bson --type informational_noer --key
bson_value_lvarchar(sales_data, 'amount') --strategy hash group group group