schema_aws.xml 15 KB
<?xml version="1.0"?>
<!DOCTYPE mycat:schema SYSTEM "schema.dtd">
<mycat:schema xmlns:mycat="http://io.mycat/">
	<!-- schema定义 -->
	<schema name="yhb_promotion_split" checkSQLschema="false" sqlMaxLimit="100">
		<table name="coupons_logs" dataNode="dn_promt_split$1-4" rule="rule_promt" />
		<table name="coupons_logs_third_info" dataNode="dn_promt_split$1-4" rule="rule_promt" />
		<table name="coupons_personal" dataNode="dn_promt_split$1-4" rule="rule_promt" />
		<table name="coupons" dataNode="dn_promt_split$1-4" type="global" />
		<table name="coupons_logs_custom_type" dataNode="dn_promt_split$1-4" rule="rule_promt" />
		<table name="coupons_bag" dataNode="dn_promt_split$1-4" rule="rule_promt" />
	</schema>

	<schema name="yh_orders_split" checkSQLschema="false" sqlMaxLimit="100">
		<table name="shopping_cart" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="shopping_cart_items" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="orders" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="orders_goods" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
		<table name="orders_coupons" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
		<table name="order_promotion_info" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
		<table name="order_ext_attribute" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
		<table name="orders_meta" dataNode="dn_order_split$1-4" rule="rule_order" ruleRequired="true" />
		<table name="crf_pay_log" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="cmb_netpay_bind" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="order_code_sequence" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="free_shipping_times" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="orders_pay" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="wx_pay_action" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="order_message" dataNode="dn_order_split$1-4" rule="rule_order" />
		<table name="order_profile" dataNode="dn_order_split$1-4" rule="rule_order" />

		<table name="orders_pre_pay" dataNode="dn_order_nosplit" />
		<table name="order_pay" dataNode="dn_order_nosplit" />
		<table name="order_default_preferences" dataNode="dn_order_nosplit" />
		<table name="order_cancel" dataNode="dn_order_nosplit" />
	</schema>


	<!-- cms -->
	<schema name="yh_resource" dataNode="dn_yh_resource" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_operations" dataNode="dn_yh_operations" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_setting" dataNode="dn_yh_setting" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_helper" dataNode="dn_yh_helper" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yoho_activity" dataNode="dn_yoho_activity" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_events" dataNode="dn_yh_events" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yhb_operations" dataNode="dn_yhb_operations" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_guang" dataNode="dn_yh_guang" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_wechat" dataNode="dn_yh_wechat" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_lottery" dataNode="dn_yh_lottery" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="q_msg_system" dataNode="dn_q_msg_system" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_consult" dataNode="dn_yh_consult" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_comment" dataNode="dn_yh_comment" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- passport -->
	<schema name="yh_passport" dataNode="dn_yh_passport" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yoho_passport" dataNode="dn_yoho_passport" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- order -->
	<schema name="yh_coupons" dataNode="dn_yh_coupons" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yh_orders" dataNode="dn_yh_orders" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yhb_promotion" dataNode="dn_yhb_promotion" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yoho_pay" dataNode="dn_yoho_pay" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- shops -->
	<schema name="yh_shops" dataNode="dn_yh_shops" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yhb_shops" dataNode="dn_yhb_shops" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- yohood -->
	<schema name="yohood" dataNode="dn_yohood" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- store -->
	<schema name="yh_extendstore" dataNode="dn_yh_extendstore" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- unions -->
	<schema name="yh_unions" dataNode="dn_yh_unions" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- uic -->
	<schema name="yh_community" dataNode="dn_yh_community" checkSQLschema="false" sqlMaxLimit="100" />

	<schema name="yh_inbox" dataNode="dn_yh_inbox" checkSQLschema="false" sqlMaxLimit="100" />
	<schema name="yoho_sms" dataNode="dn_yoho_sms" checkSQLschema="false" sqlMaxLimit="100" />

	<!-- yohobuylogs -->
	<schema name="yohobuy_logs" dataNode="dn_yohobuy_logs" checkSQLschema="false" sqlMaxLimit="100" />


	<dataNode name="dn_promt_split1" dataHost="dh_promt_split1" database="yhb_promotion" />
	<dataNode name="dn_promt_split2" dataHost="dh_promt_split2" database="yhb_promotion" />
	<dataNode name="dn_promt_split3" dataHost="dh_promt_split3" database="yhb_promotion" />
	<dataNode name="dn_promt_split4" dataHost="dh_promt_split4" database="yhb_promotion" />

	<dataNode name="dn_order_split1" dataHost="dh_orders_split1" database="yh_orders" />
	<dataNode name="dn_order_split2" dataHost="dh_orders_split2" database="yh_orders" />
	<dataNode name="dn_order_split3" dataHost="dh_orders_split3" database="yh_orders" />
	<dataNode name="dn_order_split4" dataHost="dh_orders_split4" database="yh_orders" />

	<dataNode name="dn_order_nosplit" dataHost="dh_order_nosplit" database="yh_orders" />
	<dataNode name="dn_yh_coupons" dataHost="dh_order_nosplit" database="yh_coupons" />
	<dataNode name="dn_yh_orders" dataHost="dh_order_nosplit" database="yh_orders" />
	<dataNode name="dn_yhb_promotion" dataHost="dh_order_nosplit" database="yhb_promotion" />
	<dataNode name="dn_yoho_pay" dataHost="dh_order_nosplit" database="yoho_pay" />

	<dataNode name="dn_yh_resource" dataHost="dh_cms" database="yh_resource" />
	<dataNode name="dn_yh_operations" dataHost="dh_cms" database="yh_operations" />
	<dataNode name="dn_yh_setting" dataHost="dh_cms" database="yh_setting" />
	<dataNode name="dn_yh_helper" dataHost="dh_cms" database="yh_helper" />
	<dataNode name="dn_yoho_activity" dataHost="dh_cms" database="yoho_activity" />
	<dataNode name="dn_yh_events" dataHost="dh_cms" database="yh_events" />
	<dataNode name="dn_yhb_operations" dataHost="dh_cms" database="yhb_operations" />
	<dataNode name="dn_yh_guang" dataHost="dh_cms" database="yh_guang" />
	<dataNode name="dn_yh_wechat" dataHost="dh_cms" database="yh_wechat" />
	<dataNode name="dn_yh_lottery" dataHost="dh_cms" database="yh_lottery" />
	<dataNode name="dn_q_msg_system" dataHost="dh_cms" database="q_msg_system" />
	<dataNode name="dn_yh_consult" dataHost="dh_cms" database="yh_consult" />
	<dataNode name="dn_yh_comment" dataHost="dh_cms" database="yh_comment" />

	<dataNode name="dn_yh_passport" dataHost="dh_passport" database="yh_passport" />
	<dataNode name="dn_yoho_passport" dataHost="dh_passport" database="yoho_passport" />

	<dataNode name="dn_yh_shops" dataHost="dh_shops" database="yh_shops" />
	<dataNode name="dn_yhb_shops" dataHost="dh_shops" database="yhb_shops" />

	<dataNode name="dn_yohood" dataHost="dh_yohood" database="yohood" />

	<dataNode name="dn_yh_extendstore" dataHost="dh_yh_extendstore" database="yh_extendstore" />

	<dataNode name="dn_yh_unions" dataHost="dh_yh_unions" database="yh_unions" />

	<dataNode name="dn_yh_community" dataHost="dh_uic" database="yh_community" />

	<dataNode name="dn_yh_inbox" dataHost="dh_message" database="yh_inbox" />
	<dataNode name="dn_yoho_sms" dataHost="dh_message" database="yoho_sms" />

	<dataNode name="dn_yohobuy_logs" dataHost="dh_yohobuy_logs" database="yohobuy_logs" />

	<!-- balance=0 不开启读写分离 balance=1读操作在主备和读库上执行 balance=2 读操作在写库和读库随机分布 blance=3 读操作只在读库上分布 -->
	<!-- promotion 分库分表-->
	<dataHost name="dh_promt_split1" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="promotW1" url="write1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="promotR1" url="read1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_promt_split2" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="promotW2" url="write2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="promotR2" url="read2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_promt_split3" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="promotW3" url="write3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="promotR3" url="read3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_promt_split4" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="promotW4" url="write4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
			<readHost host="promotR4" url="read4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<!-- orders分库分表-->
	<dataHost name="dh_orders_split1" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="ordersSplitW1" url="write1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="ordersSplitR1" url="read1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_orders_split2" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="ordersSplitW2" url="write2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="ordersSplitR2" url="read2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_orders_split3" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="ordersSplitW3" url="write3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="ordersSplitR3" url="read3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_orders_split4" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="ordersSplitW4" url="write4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
			<readHost host="ordersSplitR4" url="read4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<!-- orders 未拆分库 -->
	<dataHost name="dh_order_nosplit" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="ordersNosplitW1" url="write.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="ordersNosplitR1" url="read.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_cms" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="cmsW1" url="write.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="cmsR1" url="read.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>
	<dataHost name="dh_passport" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="passportW1" url="write.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="passportR1" url="read.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_shops" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="shopsW1" url="write.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="shopsR1" url="read.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_yohood" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="yohoodW1" url="write.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="yohoodR1" url="read.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_yh_extendstore" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="yhExtendstoreW1" url="write.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="yhExtendstoreR1" url="read.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_yh_unions" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="unionsW1" url="write.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="unionsR1" url="read.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_uic" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="uicW1" url="write.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="uicR1" url="read.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_message" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="messageW1" url="write.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="messageR1" url="read.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

	<dataHost name="dh_yohobuy_logs" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
		<heartbeat>select 1</heartbeat>
		<writeHost host="yohobuyLogsW1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak">
			<readHost host="yohobuyLogsR1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak" />
		</writeHost>
	</dataHost>

</mycat:schema>