![]() |
export LISTENPORT=11220 ; export CASSANDRAKEYSPACE=kvstore ; export CASSANDRABUCKET=bucket_1 ; export BUFFERITEMSIZE=10000 ; ./memandra
- only compatible with golang 1.10.x and more
- no CLI options, everything is taken from env vars ... just start it !
Env vars list (and default values) :
LISTENPORT" = 11221
METRICSLISTENADDR = ":11299"
CASSANDRAHOST = "127.0.0.1"
CASSANDRAKEYSPACE = "kvstore"
CASSANDRABUCKET = "bucket"
BUFFERITEMSIZE = 80000
BUFFERMAXAGE = "200ms"
BATCHMINSIZE = 1000
BATCHMAXSIZE = 5000
CASSANDRATIMEOUT = "1000ms"
CASSANDRACONNTIMEOUT = "1000ms"
Cassandra schema example :
CREATE KEYSPACE kvstore WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'} AND durable_writes = false;
CREATE TABLE kvstore.bucket (
keycol blob PRIMARY KEY,
valuecol blob
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 3600
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE';
- TODO