Configuration

July 7, 2015 ยท View on GitHub

NkBASE has several run-time configuration options. It uses standard Erlang application environment variables. Some options as specific for the nkbase application, while others belong to the riak_core or riak_ensemble applications.

NkBASE config options

The current recognized options are:

OptionsTypeDefaultDescription
expire_resolutioninteger()1000Resolution for auto-expiration of timers in msecs (see auto-expiration)
expire_checkinteger()60Minimum time (in secs) to decide to delay the expiration timers
vnode_workersinteger()10Number of workers to start at each vnode to process async requests
leveldbboolean()trueActivates the LevelDB backend
leveldb_optionsproplist()[{max_open_files, 100}]Options for the leveldb backend (see eleveldb.erl and Riak configuration options)

Lager configuration options

Have a look at the lager repository documentation.

Riak Core config options

Riak Core has many configuration options. The most important are:

OptionsTypeDefaultDescription
cluster_namestring()"default"Cluster name to use
platform_data_dirstring()"data"Directory to place the ring and all NkBASE information and databases
ring_creation_sizeinteger()8Number of vnodes to start
target_n_valinteger()4Highest n that you generally intend to use (to be used in vnodes distribution policy)
enable_consensusboolean()falseStart the strong consistency system

Have a look to the riak_core repository and related Riak configuration options.

Riak Ensemble config options

Riak Ensemble has many configuration options. The most important are:

OptionsTypeDefaultDescription
ensemble_tickinteger()500Time to refresh leases (msecs)
lease_durationinteger()ensemble_tick * 3 div 2Leader lease duration
trust_leaseboolean()trueIf leader leases are trusted or not. Trusting the lease allows a leader to reply to reads without contacting remote peers as long as its lease has not yet expired
follower_timeoutinteger()lease_duration * 4How long a follower waits to hear from the leader before abandoning it
peer_get_timeoutinteger()60000Internal timeout used by peer worker FSMs when performing gets
peer_put_timeoutinteger()60000Internal timeout used by peer worker FSMs when performing puts
alive_tokensinteger()2Number of leader ticks that can go by without hearing from the ensemble
peer_workersinteger()1The number of peer workers/FSM processes used by the leader
storage_delayinteger()50The operation delay used to coalesce multiple local operations into a single disk operation
storage_tickinteger()5000Periodic tick at which ensembles flushes operations to disk even if there are no explicit sync requests
tree_validationboolean()trueWhen true, synctrees are not trusted after a peer restart, requiring an exchange with a trusted majority to become trusted. This provides the strongest guarantees against byzantine faults.
synchronous_tree_updatesboolean()falseDetermines if remote synctree updates are performed synchronously. When true, tree updates are performed before replying to the user

Have a look at the Riak configuration options for aditional information.