##
##  ddb.conf -- DalmatinerDB Server Configuration
##

tcp_port                                = 5555
tcp_listeners                           = 100
tcp_max_connections                     = 1024
tcp.max_batch_size                      = 500

async_workers                           = 5

handoff_max_chunk_size                  = 1KB
points_per_file                         = 604800
lifetime                                = infinity
mstore.max_files                        = 2
vacuum_interval                         = 1h

n                                       = 1
r                                       = 1
w                                       = 1

schema_dir                              = @l_prefix@/lib/dalmatinerdb/share/schema
self_monitor                            = on
metrics.transport_compression           = snappy

read_repair.delay                       = 1m
read_repair.partial_read_repair         = on

io.max_async                            = 20
io.timeout                              = 30s
io.parallel_reads                       = off
io.parallel_reads.queue_size            = 5
io.parallel_reads.min_size              = 1000
io.parallel_reads.queue_strategy        = fifo

vnode.cache.size                        = 10MB
vnode.cache.buckets                     = 128
vnode.cache.initial_entries             = 2
vnode.cache.initial_data                = 32
vnode.cache.age_cycle                   = 1000000
vnode.cache.max_gap                     = 10

nodename                                = dalmatinerdb@127.0.0.1
distributed_cookie                      = erlang

erlang.async_threads                    = 64
erlang.max_ports                        = 65536

anti_entropy                            = on

anti_entropy.build_limit.number         = 1
anti_entropy.build_limit.per_timespan   = 1h
anti_entropy.expire                     = 1w
anti_entropy.concurrency                = 2
anti_entropy.tick                       = 15s
anti_entropy.data_dir                   = @l_prefix@/var/dalmatinerdb/db/anti_entropy
anti_entropy.total_leveldb_mem_percent  = 80
anti_entropy.bloomfilter                = on

ring_size                               = 64
transfer_limit                          = 2

#ssl.certfile                           = $(platform_etc_dir)/cert.pem
#ssl.keyfile                            = $(platform_etc_dir)/key.pem
#ssl.cacertfile                         = $(platform_etc_dir)/cacertfile.pem

handoff.ip                              = 127.0.0.1
handoff.inactivity_timeout              = 1m
dtrace                                  = off

platform_etc_dir                        = @l_prefix@/etc/dalmatinerdb
platform_bin_dir                        = @l_prefix@/lib/dalmatinerdb/bin
platform_lib_dir                        = @l_prefix@/lib/dalmatinerdb/lib
platform_data_dir                       = @l_prefix@/var/dalmatinerdb/db
platform_log_dir                        = @l_prefix@/var/dalmatinerdb/log

strong_consistency                      = on
worker.queue_strategy                   = fifo

log.service                             = dalmatinerdb
log.console                             = file
log.console.level                       = info
log.console.file                        = @l_prefix@/var/dalmatinerdb/log/ddb.console.log
log.error.file                          = @l_prefix@/var/dalmatinerdb/log/ddb.error.log
log.syslog                              = off
log.error.redirect                      = on
log.error.messages_per_second           = 100

otters.batch_interval                   = 100ms
otters.zapkin_url                       = http://127.0.0.1:9411/api/v1/spans
otters.host                             = 127.0.0.1:0
otters.service                          = dalmatinerdb
otters.add_service_to_log               = off
otters.add_service_to_tags              = off
otters.default_key                      = lc
otters.default_value                    = v
otters.filter                           = @l_prefix@/etc/dalmatinerdb/ddb-rules.ot

