# xSQL Cluster Parameters

> The xSQL configuration file can be used to define eXtremeDB Cluster parameters corresponding to the C API ``mco_cluster_params_t`` structure.

> ### For an overview see page Configuration File Parameters

> The `cluster_params` section consists of a set of "name : value" pairs enclosed within braces. For example:

>         cluster_params : {
>             mem_page_size : 256,
>             nodes : [
>                 {
>                     addr : "127.0.0.1:5000",
>                     qrank : 0
>                 },
>             ],
>             node_id : 0,
>             ...
>         }

> The following table lists the possible options for the `cluster_params` section with the corresponding C API structures and values specified in the comment:

> Option name : example value | Comment
> --- | ---
> nodes : [ { ...} ] | List (array) of cluster nodes (``mco_cluster_node_params_t`.addr` and `mco_cluster_node_params_t`.`qrank`)
>         nodes : [
>         {
>             # Node address in form <IP/hostname>:<port> (mco_cluster_node_params_t::addr)
>             addr : "127.0.0.1:5000",

>             # Quorum rank (mco_cluster_node_params_t::qrank), unsigned
>             qrank : 0
>         },
>         ]
> node_id : 0, | Current node ID (`mco_cluster_params_t::node_id`), unsigned
> conn_pool_factor: 50, | Size of connection pool in percents of `db_max_connections` (`mco_cluster_params_t::conn_pool_factor`)
> n_listener_threads : 5, | The number of cluster listener threads. Default value is 1; larger values allow to increase performance while handling remote transactions
> sync_msg_objects : 100, | Max number of objects per message during synchronization (`mco_cluster_params_t::sync_msg_objects`), unsigned
> sync_msg_size : 100k, | Max size of message in bytes during synchronization (`mco_cluster_params_t::sync_msg_size`), unsigned
> window : {...} | Transaction window parameters (`mco_cluster_params_t::window`)
>         window : {
>             # Size of window buffer in bytes (mco_cluster_window_t::bsize), unsigned
>             bsize : 100k

>             # Number of transactions (mco_cluster_window_t::length), unsigned
>             length : 4,

>             # Window timeout in milliseconds (mco_cluster_window_t::timeout), unsigned
>             timeout : 10,
>         },
> cl_sndbuf : 2k, | Internal send buffer size in bytes (`mco_cluster_params_t::cl_sndbuf`), unsigned
> cl_rcvbuf : 2k, | Internal receive buffer size in bytes (`mco_cluster_params_t::cl_rcvbuf`), unsigned
> mode_mask : binary_evolution, | Cluster mode mask (`mco_cluster_params_t::mode_mask`), combination of `binary_evolution` (`MCO_CLUSTER_MODE_BINARY_EVOLUTION`) and `early_data_send` (`MCO_CLUSTER_MODE_EARLY_DATA_SEND`)
> quorum_policy : qrank_based, | Custom quorum policies. Possible values are : `qrank_based` - default policy based on node's qrank; `always_writable` - allows WRITE transactions on the node regardless of state of other nodes `all_nodes_required` - WRITE transactions are allowed only if all other nodes are alive and connected to the current node
> auto_detach : true, | Detach node from cluster on exit, boolean. Default value is `false`
> ssl_params : {...} | Cluster-specific SSL settings. See the global `ssl_params` section for the description of the parameters and their default values. These parameters override the global settings. To inherit the global `ssl_params` settings, leave the `ssl_params` section empty. (They have the same parameters and default values as the global section, except for `ca_path` and `ca_file`, which are only allowed in the global section.)
> nw_tcp : {...} | TCP/IP parameters (`mco_cluster_params_t::nw::tcp`)
>         nw_tcp : {
>             # Maximum socket send buffer in bytes (mco_clnw_tcp_params_t::so_sndbuf), unsigned
>             so_sndbuf : 16k,

>             # Maximum socket receive buffer in bytes (mco_clnw_tcp_params_t::so_rcvbuf), unsigned
>             so_rcvbuf : 16k,

>             # Timeout for connecting nodes to each other in milliseconds
>             # (mco_clnw_tcp_params_t::connect_timeout), unsigned
>             connect_timeout : 5000,

>             # Time between attempts to connect to other nodes in milliseconds
>             # (mco_clnw_tcp_params_t::connect_interval), unsigned
>             connect_interval : 500,

>             # Number of milliseconds between keep-alive messages in milliseconds
>             # (mco_clnw_tcp_params_t::keepalive_time), unsigned
>             keepalive_time : 1000,

>             # Number of keep-alive probes to send before node disconnects
>             # (mco_clnw_tcp_params_t::keepalive_probes), unsigned
>             keepalive_probes : 5,

>             # The level of compression: 0 = no compression; 1 = best speed,
>             # 9 - best compression. Default value is 0
>             compression_level : 9,

>             # mco_clnw_tcp_params_t::socket_domain, one of
>             # 'inet' (MCO_SOCK_INET_DOMAIN), 'local' (MCO_SOCK_LOCAL_DOMAIN) or
>             # 'sdp' (MCO_SOCK_SDP_DOMAIN)
>             socket_domain : inet,
>         },
> nw_mpi : {...} | MPI parameters (`mco_cluster_params_t::nw::mpi`)
>         nw_mpi : {
>             # MPI mode flags (mco_clnw_mpi_params_t::flags). combination of
>             # 'busywait' (MCO_CLUSTER_MPI_BUSYWAIT) and
>             # 'serialized_send' (MCO_CLUSTER_MPI_SERIALIZED_SEND)
>             flags : busywait
>         },