AndMySQLCompared with the official MySQL Proxy,AmoebaThe configuration is very convenient for XML-based configuration files, and the rules are written in SQLJEP syntax, which is easier than the MySQL Proxy Based on lua scripts ). This article mainly introduces the Amoeba configuration file. Next we will introduce it one by one.
Amoeba has a total of seven configuration files:
Amoeba main configuration file ($ AMOEBA_HOME/conf/amoeba. xml), used to configure basic parameters of the Amoeba service, for example, Amoeba host address, port, authentication method, user name for connection, password, number of threads, timeout time, and location of other configuration files.
The database server configuration file ($ AMOEBA_HOME/conf/dbServers. xml) is used to store and configure the information of the database server represented by Amoeba, such as the host IP address, port, user name, and password.
The splitting rule configuration file ($ AMOEBA_HOME/conf/rule. xml) is used to configure the splitting rule.
The database function configuration file ($ AMOEBA_HOME/conf/functionMap. xml) is used to configure the database function processing method. Amoeba parses the database function using the method in this configuration file.
The splitting rule function configuration file ($ AMOEBA_HOME/conf/ruleFunctionMap. xml) is used to configure the Processing Methods of user-defined functions used in splitting rules.
The access rule configuration file ($ AMOEBA_HOME/conf/access_list.conf) is used to authorize or prohibit some Server IP addresses from accessing Amoeba.
The log specification configuration file ($ AMOEBA_HOME/conf/log4j. xml) is used to configure the log output level and method of Amoeba.
Note:These configuration files are simple, but can be designed to meet the needs of a variety of database architecture, segmentation rules and O & M policy configuration. This allows us to focus on the design of various rules and policies that suit us, without having to worry too much about the constraints of the configuration file.