# Best Practices for node hosts in Cronos
In order to make it more convenient for Dapps and node hosts to setup a node, we put together a list of useful settings and configurations. Feel free to refer to this guide, and adapt settings to suit your use-case.
# config.toml
# Log_level
infoDepending on the needs of your application it is ok to stick toinfo(default), but do consider setting up log-rotation for your logs, and archive logs after a certain amount of time or size, e.g. use a cron job with weekly rotation or until your file size hits ~5GB.- set to
debugonly for debugging purpose, turn off after you are finished with debugging.
# db_backend
goleveldb(default) db: for low / medium level traffic use case. The reason being there can be some lock contention, especially with P2P.rocksdbsuited for a lot of use-cases, especially for high query load ~ few M / day. Has a better balance between rpc queries and p2p at high traffic. Note thatRocksdbhowever might have a slower startup time and requires a higher memory allocation.
# max_num_inbound_peers and max_num_outbound_peers
max_num_inbound_peersFor node providers the number of inbound peers can be set to a higher value for example 50.max_num_outbound_peersFor users on a private network set a higher number of outbound peers to 30 for example.- After peers are connected, set it back to its default value. Note that some trial values might be needed to get it right.
# app.toml
# pruning
defaultNormal usage can just set to default. In the Cosmos SDK this is defined as:
PruneDefault = NewPruningOptions(362880, 100, 10)
meaning the app will keep the latest 362880 versions (around 21 days by 5 secs block time), and then only keep 1 version for every 100 blocks past the keepRecent period( the rest will be put into the pruning list), and then execute the pruning every 10 blocks.
everythingif you only need to do transaction broadcasting and only need the last blocks.nothingfor DApps that want to be able to query information at a certain known blockheight. Note that this is only needed forarchivenodes.