Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the nine attributes of the Mycat dataHost tag?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What are the nine attributes of the Mycat dataHost tag? for this question, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

The Mycat dataHost tag defines the specific database instance, read-write separation configuration, and heartbeat statements.

The dataHost tag has nine attributes:

(1) .name: node host name

(2) .maxCon: specify the maximum connection for each read-write instance connection pool

(3) .minCon: specify the minimum connection for each read-write instance connection pool, that is, initialize the size of the connection pool

(4) .balance: the type of load balancer for read operations. Currently, there are three available values "0", "1", "2" and "3". Read-write separation related strategies. The "0" in the example means that read-write separation is not enabled, and all read operations are sent to writeHost.

(5) .writeType: write load balancer type. Currently, there are three available values "0", "1" and "2". In the example, "0" means that all write operations are sent to the first writeHost, and the first one fails to switch to the second writeHost that is still alive.

(6) .dbType: specifies the database type of the connection, which currently supports the binary Mysql protocol, as well as other JDBC connected databases. For example, mongodb, oracle, spark, etc.

(7) .dbDriver: specifies the driver to connect to the database, which is currently available as native and JDBC. Native supports mysql and mariadb, and other databases need to be driven by JDBC

(8) .switchType: automatically switch identities. "1" is the default value, which means no automatic switching. Other options refer to "1" and "2". Do not expand for the time being.

(9). After tempReadHostAvailable:writeHost is lost, the readHost below it is still available. Default is 0. Available values are 0 and 1.

This is the answer to the question about what the nine attributes of the Mycat dataHost tag are. I hope the above content can be of some help to everyone. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report