Default Configuration File, shard.conf
shard.conf is the default configuration file of the CUBRID SHARD, having a very similar format and content to cubrid_broker.conf, the configuration file of the existing CUBRID Broker/CAS.
shard.conf contains all the parameter settings as cubrid_broker.conf in an identical manner. This document describes the settings added to shard.conf. For more information on the cubrid_broker.conf, see "Performance Tuning > cubrid_broker.conf Configuration File and Default Parameters.
|
Parameter Name
|
Type
|
Default Value
|
Dynamic Change
|
|
IGNORE_SHARD_HINT
|
string
|
OFF
|
|
|
MIN_NUM_PROXY
|
int
|
1
|
|
|
MAX_NUM_PROXY
|
int
|
1
|
|
|
PROXY_LOG
|
string
|
ERROR
|
available
|
|
PROXY_LOG_DIR
|
string
|
log/broker/proxy_log
|
|
|
PROXY_LOG_MAX_SIZE
|
int
|
100000
|
available
|
|
PROXY_MAX_PREPARED_STMT_COUNT
|
int
|
2000
|
|
|
MAX_CLIENT
|
int
|
10
|
|
|
METADATA_SHM_ID
|
int
|
-
|
|
|
SHARD_CONNECTION_FILE
|
string
|
shard_connection.txt
|
|
|
SHARD_DB_NAME
|
string
|
-
|
available
|
|
SHARD_DB_USER
|
string
|
-
|
available
|
|
SHARD_DB_PASSWORD
|
string
|
-
|
available
|
|
SHARD_KEY_FILE
|
string
|
shard_key.txt
|
|
|
SHARD_KEY_MODULAR
|
int
|
256
|
|
|
SHARD_KEY_LIBRARY_NAME
|
string
|
-
|
|
|
SHARD_KEY_FUNCTION_NAME
|
string
|
-
|
|
- SHARD_DB_NAME: The name of the shard DB, used to verify the request for connection from an application.
- SHARD_DB_USER: The name of the backend shard DB user, used to connect to the backend DBMS for the shard CAS process as well as to verify the request for connection from an application. User names on all shard DBs should be identical.
- SHARD_DB_PASSWORD: The user password of the backend shard DB, used to connect to the backend DBMS for the shard CAS process as well as to verify the request for connection from an application. Passwords of all shard DBs should be identical.
- MIN_NUM_PROXY: The minimum number of shard proxy processes.
- MAX_NUM_PROXY: The maximum number of shard proxy processes.
- PROXY_LOG_DIR: The directory path where the shard proxy logs will be saved.
- PROXY_LOG: The shard proxy log level. It can be set to one of the following values:
- ALL: All logs
- ON: All logs
- SHARD: Logs for selecting and processing shard DBs.
- SCHEDULE: Logs for scheduling tasks.
- NOTICE: Logs for key notices.
- TIMEOUT: Logs for timeouts.
- ERROR: Logs for errors.
- NONE: No log is recorded.
- OFF: No log is recorded.
- PROXY_MAX_PREPARED_STMT_COUNT: The maximum size of statement pool managed by shard proxy
- MAX_CLIENT: The number of applications that can be concurrently connected by using the shard proxy.
- METADATA_SHM_ID: Shared memory identifier of the shard metadata storage.
- SHARD_CONNECTION_FILE: The path of the shard connection configuration file. The shard connection configuration file should be located in $CUBRID/conf. For more information, see the shard connection configuration file. :
- SHARD_KEY_FILE: The path of the shard key configuration file. The shard key configuration file should be located in $CUBRID/conf. For more information, see the shard key configuration file. :
- SHARD_KEY_MODULAR: The parameter to specify the range of results of the default shard key hash function. The result of the function is shard_key(integer) % SHARD_KEY_MODULAR. For related issues, see shard key configuration file and Setting user-defined hash function.
- SHARD_KEY_LIBRARY_NAME: Specify the library path loadable at runtime to specify the user hash function for the shard key. If the SHARD_KEY_LIBRARY_NAME parameter is set, the SHARD_KEY_FUNCTION_NAME parameter should also be set. For more information, see Setting user-defined hash function.
- SHARD_KEY_FUNCTION_NAME: The parameter to specify the name of the user hash function for shard key. For more information, see Setting user-defined hash function.
- PROXY_LOG_MAX_SIZE: The maximum size of the shard proxy log file in KB. The maximum value is 1,000,000.
- IGNORE_SHARD_HINT: When this value is ON, the hint provided to connect to a specific shard is ignored and the database to connect is selected based on the defined rule. The default value is OFF. It can be used to balance the read load while all databases are copied with the same data. For example, to give the load of an application to only one node among several replication nodes, the shard proxy automatically determines the node (database) with one connection to a specific shard.