blob: 887f5f1631c78f4c68c3ddb156df0d4d79b55cb5 [file] [log] [blame]
Woojoong Kim06e455a2018-01-18 13:51:46 -08001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Cassandra storage config YAML
16
17# NOTE:
18# See http://wiki.apache.org/cassandra/StorageConfiguration for
19# full explanations of configuration directives
20# /NOTE
21
22# The name of the cluster. This is mainly used to prevent machines in
23# one logical cluster from joining another.
24cluster_name: 'HSS Cluster'
25
26# This defines the number of tokens randomly assigned to this node on the ring
27# The more tokens, relative to other nodes, the larger the proportion of data
28# that this node will store. You probably want all nodes to have the same number
29# of tokens assuming they have equal hardware capability.
30#
31# If you leave this unspecified, Cassandra will use the default of 1 token for legacy compatibility,
32# and will use the initial_token as described below.
33#
34# Specifying initial_token will override this setting on the node's initial start,
35# on subsequent starts, this setting will apply even if initial token is set.
36#
37# If you already have a cluster with 1 token per node, and wish to migrate to
38# multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
39num_tokens: 256
40
41# initial_token allows you to specify tokens manually. While you can use # it with
42# vnodes (num_tokens > 1, above) -- in which case you should provide a
43# comma-separated list -- it's primarily used when adding nodes # to legacy clusters
44# that do not have vnodes enabled.
45# initial_token:
46
47# See http://wiki.apache.org/cassandra/HintedHandoff
48# May either be "true" or "false" to enable globally, or contain a list
49# of data centers to enable per-datacenter.
50# hinted_handoff_enabled: DC1,DC2
51hinted_handoff_enabled: true
52# this defines the maximum amount of time a dead host will have hints
53# generated. After it has been dead this long, new hints for it will not be
54# created until it has been seen alive and gone down again.
55max_hint_window_in_ms: 10800000 # 3 hours
56# Maximum throttle in KBs per second, per delivery thread. This will be
57# reduced proportionally to the number of nodes in the cluster. (If there
58# are two nodes in the cluster, each delivery thread will use the maximum
59# rate; if there are three, each will throttle to half of the maximum,
60# since we expect two nodes to be delivering hints simultaneously.)
61hinted_handoff_throttle_in_kb: 1024
62# Number of threads with which to deliver hints;
63# Consider increasing this number when you have multi-dc deployments, since
64# cross-dc handoff tends to be slower
65max_hints_delivery_threads: 2
66
67# Maximum throttle in KBs per second, total. This will be
68# reduced proportionally to the number of nodes in the cluster.
69batchlog_replay_throttle_in_kb: 1024
70
71# Authentication backend, implementing IAuthenticator; used to identify users
72# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthenticator,
73# PasswordAuthenticator}.
74#
75# - AllowAllAuthenticator performs no checks - set it to disable authentication.
76# - PasswordAuthenticator relies on username/password pairs to authenticate
77# users. It keeps usernames and hashed passwords in system_auth.credentials table.
78# Please increase system_auth keyspace replication factor if you use this authenticator.
79authenticator: AllowAllAuthenticator
80
81# Authorization backend, implementing IAuthorizer; used to limit access/provide permissions
82# Out of the box, Cassandra provides org.apache.cassandra.auth.{AllowAllAuthorizer,
83# CassandraAuthorizer}.
84#
85# - AllowAllAuthorizer allows any action to any user - set it to disable authorization.
86# - CassandraAuthorizer stores permissions in system_auth.permissions table. Please
87# increase system_auth keyspace replication factor if you use this authorizer.
88authorizer: AllowAllAuthorizer
89
90# Validity period for permissions cache (fetching permissions can be an
91# expensive operation depending on the authorizer, CassandraAuthorizer is
92# one example). Defaults to 2000, set to 0 to disable.
93# Will be disabled automatically for AllowAllAuthorizer.
94permissions_validity_in_ms: 2000
95
96# Refresh interval for permissions cache (if enabled).
97# After this interval, cache entries become eligible for refresh. Upon next
98# access, an async reload is scheduled and the old value returned until it
99# completes. If permissions_validity_in_ms is non-zero, then this must be
100# also.
101# Defaults to the same value as permissions_validity_in_ms.
102# permissions_update_interval_in_ms: 1000
103
104# The partitioner is responsible for distributing groups of rows (by
105# partition key) across nodes in the cluster. You should leave this
106# alone for new clusters. The partitioner can NOT be changed without
107# reloading all data, so when upgrading you should set this to the
108# same partitioner you were already using.
109#
110# Besides Murmur3Partitioner, partitioners included for backwards
111# compatibility include RandomPartitioner, ByteOrderedPartitioner, and
112# OrderPreservingPartitioner.
113#
114partitioner: org.apache.cassandra.dht.Murmur3Partitioner
115
116# Directories where Cassandra should store data on disk. Cassandra
117# will spread data evenly across them, subject to the granularity of
118# the configured compaction strategy.
119# If not set, the default directory is $CASSANDRA_HOME/data/data.
120data_file_directories:
121 - /var/lib/cassandra/data
122
123# commit log. when running on magnetic HDD, this should be a
124# separate spindle than the data directories.
125# If not set, the default directory is $CASSANDRA_HOME/data/commitlog.
126commitlog_directory: /var/lib/cassandra/commitlog
127
128# policy for data disk failures:
129# die: shut down gossip and client transports and kill the JVM for any fs errors or
130# single-sstable errors, so the node can be replaced.
131# stop_paranoid: shut down gossip and client transports even for single-sstable errors,
132# kill the JVM for errors during startup.
133# stop: shut down gossip and client transports, leaving the node effectively dead, but
134# can still be inspected via JMX, kill the JVM for errors during startup.
135# best_effort: stop using the failed disk and respond to requests based on
136# remaining available sstables. This means you WILL see obsolete
137# data at CL.ONE!
138# ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
139disk_failure_policy: stop
140
141# policy for commit disk failures:
142# die: shut down gossip and Thrift and kill the JVM, so the node can be replaced.
143# stop: shut down gossip and Thrift, leaving the node effectively dead, but
144# can still be inspected via JMX.
145# stop_commit: shutdown the commit log, letting writes collect but
146# continuing to service reads, as in pre-2.0.5 Cassandra
147# ignore: ignore fatal errors and let the batches fail
148commit_failure_policy: stop
149
150# Maximum size of the key cache in memory.
151#
152# Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
153# minimum, sometimes more. The key cache is fairly tiny for the amount of
154# time it saves, so it's worthwhile to use it at large numbers.
155# The row cache saves even more time, but must contain the entire row,
156# so it is extremely space-intensive. It's best to only use the
157# row cache if you have hot rows or static rows.
158#
159# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
160#
161# Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
162key_cache_size_in_mb:
163
164# Duration in seconds after which Cassandra should
165# save the key cache. Caches are saved to saved_caches_directory as
166# specified in this configuration file.
167#
168# Saved caches greatly improve cold-start speeds, and is relatively cheap in
169# terms of I/O for the key cache. Row cache saving is much more expensive and
170# has limited use.
171#
172# Default is 14400 or 4 hours.
173key_cache_save_period: 14400
174
175# Number of keys from the key cache to save
176# Disabled by default, meaning all keys are going to be saved
177# key_cache_keys_to_save: 100
178
179# Maximum size of the row cache in memory.
180# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
181#
182# Default value is 0, to disable row caching.
183row_cache_size_in_mb: 0
184
185# Duration in seconds after which Cassandra should
186# save the row cache. Caches are saved to saved_caches_directory as specified
187# in this configuration file.
188#
189# Saved caches greatly improve cold-start speeds, and is relatively cheap in
190# terms of I/O for the key cache. Row cache saving is much more expensive and
191# has limited use.
192#
193# Default is 0 to disable saving the row cache.
194row_cache_save_period: 0
195
196# Number of keys from the row cache to save
197# Disabled by default, meaning all keys are going to be saved
198# row_cache_keys_to_save: 100
199
200# Maximum size of the counter cache in memory.
201#
202# Counter cache helps to reduce counter locks' contention for hot counter cells.
203# In case of RF = 1 a counter cache hit will cause Cassandra to skip the read before
204# write entirely. With RF > 1 a counter cache hit will still help to reduce the duration
205# of the lock hold, helping with hot counter cell updates, but will not allow skipping
206# the read entirely. Only the local (clock, count) tuple of a counter cell is kept
207# in memory, not the whole counter, so it's relatively cheap.
208#
209# NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
210#
211# Default value is empty to make it "auto" (min(2.5% of Heap (in MB), 50MB)). Set to 0 to disable counter cache.
212# NOTE: if you perform counter deletes and rely on low gcgs, you should disable the counter cache.
213counter_cache_size_in_mb:
214
215# Duration in seconds after which Cassandra should
216# save the counter cache (keys only). Caches are saved to saved_caches_directory as
217# specified in this configuration file.
218#
219# Default is 7200 or 2 hours.
220counter_cache_save_period: 7200
221
222# Number of keys from the counter cache to save
223# Disabled by default, meaning all keys are going to be saved
224# counter_cache_keys_to_save: 100
225
226# The off-heap memory allocator. Affects storage engine metadata as
227# well as caches. Experiments show that JEMAlloc saves some memory
228# than the native GCC allocator (i.e., JEMalloc is more
229# fragmentation-resistant).
230#
231# Supported values are: NativeAllocator, JEMallocAllocator
232#
233# If you intend to use JEMallocAllocator you have to install JEMalloc as library and
234# modify cassandra-env.sh as directed in the file.
235#
236# Defaults to NativeAllocator
237# memory_allocator: NativeAllocator
238
239# saved caches
240# If not set, the default directory is $CASSANDRA_HOME/data/saved_caches.
241saved_caches_directory: /var/lib/cassandra/saved_caches
242
243# commitlog_sync may be either "periodic" or "batch."
244#
245# When in batch mode, Cassandra won't ack writes until the commit log
246# has been fsynced to disk. It will wait
247# commitlog_sync_batch_window_in_ms milliseconds between fsyncs.
248# This window should be kept short because the writer threads will
249# be unable to do extra work while waiting. (You may need to increase
250# concurrent_writes for the same reason.)
251#
252# commitlog_sync: batch
253# commitlog_sync_batch_window_in_ms: 2
254#
255# the other option is "periodic" where writes may be acked immediately
256# and the CommitLog is simply synced every commitlog_sync_period_in_ms
257# milliseconds.
258commitlog_sync: periodic
259commitlog_sync_period_in_ms: 10000
260
261# The size of the individual commitlog file segments. A commitlog
262# segment may be archived, deleted, or recycled once all the data
263# in it (potentially from each columnfamily in the system) has been
264# flushed to sstables.
265#
266# The default size is 32, which is almost always fine, but if you are
267# archiving commitlog segments (see commitlog_archiving.properties),
268# then you probably want a finer granularity of archiving; 8 or 16 MB
269# is reasonable.
270commitlog_segment_size_in_mb: 32
271
272# Reuse commit log files when possible. The default is false, and this
273# feature will be removed entirely in future versions of Cassandra.
274#commitlog_segment_recycling: false
275
276# any class that implements the SeedProvider interface and has a
277# constructor that takes a Map<String, String> of parameters will do.
278seed_provider:
279 # Addresses of hosts that are deemed contact points.
280 # Cassandra nodes use this list of hosts to find each other and learn
281 # the topology of the ring. You must change this if you are running
282 # multiple nodes!
283 - class_name: org.apache.cassandra.locator.SimpleSeedProvider
284 parameters:
285 # seeds is actually a comma-delimited list of addresses.
286 # Ex: "<ip1>,<ip2>,<ip3>"
287 - seeds: "{{ db_ip }}"
288
289# For workloads with more data than can fit in memory, Cassandra's
290# bottleneck will be reads that need to fetch data from
291# disk. "concurrent_reads" should be set to (16 * number_of_drives) in
292# order to allow the operations to enqueue low enough in the stack
293# that the OS and drives can reorder them. Same applies to
294# "concurrent_counter_writes", since counter writes read the current
295# values before incrementing and writing them back.
296#
297# On the other hand, since writes are almost never IO bound, the ideal
298# number of "concurrent_writes" is dependent on the number of cores in
299# your system; (8 * number_of_cores) is a good rule of thumb.
300concurrent_reads: 32
301concurrent_writes: 32
302concurrent_counter_writes: 32
303
304# Total memory to use for sstable-reading buffers. Defaults to
305# the smaller of 1/4 of heap or 512MB.
306# file_cache_size_in_mb: 512
307
308# Total permitted memory to use for memtables. Cassandra will stop
309# accepting writes when the limit is exceeded until a flush completes,
310# and will trigger a flush based on memtable_cleanup_threshold
311# If omitted, Cassandra will set both to 1/4 the size of the heap.
312# memtable_heap_space_in_mb: 2048
313# memtable_offheap_space_in_mb: 2048
314
315# Ratio of occupied non-flushing memtable size to total permitted size
316# that will trigger a flush of the largest memtable. Lager mct will
317# mean larger flushes and hence less compaction, but also less concurrent
318# flush activity which can make it difficult to keep your disks fed
319# under heavy write load.
320#
321# memtable_cleanup_threshold defaults to 1 / (memtable_flush_writers + 1)
322# memtable_cleanup_threshold: 0.11
323
324# Specify the way Cassandra allocates and manages memtable memory.
325# Options are:
326# heap_buffers: on heap nio buffers
327# offheap_buffers: off heap (direct) nio buffers
328# offheap_objects: native memory, eliminating nio buffer heap overhead
329memtable_allocation_type: heap_buffers
330
331# Total space to use for commitlogs. Since commitlog segments are
332# mmapped, and hence use up address space, the default size is 32
333# on 32-bit JVMs, and 8192 on 64-bit JVMs.
334#
335# If space gets above this value (it will round up to the next nearest
336# segment multiple), Cassandra will flush every dirty CF in the oldest
337# segment and remove it. So a small total commitlog space will tend
338# to cause more flush activity on less-active columnfamilies.
339# commitlog_total_space_in_mb: 8192
340
341# This sets the amount of memtable flush writer threads. These will
342# be blocked by disk io, and each one will hold a memtable in memory
343# while blocked.
344#
345# memtable_flush_writers defaults to the smaller of (number of disks,
346# number of cores), with a minimum of 2 and a maximum of 8.
347#
348# If your data directories are backed by SSD, you should increase this
349# to the number of cores.
350#memtable_flush_writers: 8
351
352# A fixed memory pool size in MB for for SSTable index summaries. If left
353# empty, this will default to 5% of the heap size. If the memory usage of
354# all index summaries exceeds this limit, SSTables with low read rates will
355# shrink their index summaries in order to meet this limit. However, this
356# is a best-effort process. In extreme conditions Cassandra may need to use
357# more than this amount of memory.
358index_summary_capacity_in_mb:
359
360# How frequently index summaries should be resampled. This is done
361# periodically to redistribute memory from the fixed-size pool to sstables
362# proportional their recent read rates. Setting to -1 will disable this
363# process, leaving existing index summaries at their current sampling level.
364index_summary_resize_interval_in_minutes: 60
365
366# Whether to, when doing sequential writing, fsync() at intervals in
367# order to force the operating system to flush the dirty
368# buffers. Enable this to avoid sudden dirty buffer flushing from
369# impacting read latencies. Almost always a good idea on SSDs; not
370# necessarily on platters.
371trickle_fsync: false
372trickle_fsync_interval_in_kb: 10240
373
374# TCP port, for commands and data
375# For security reasons, you should not expose this port to the internet. Firewall it if needed.
376storage_port: 7000
377
378# SSL port, for encrypted communication. Unused unless enabled in
379# encryption_options
380# For security reasons, you should not expose this port to the internet. Firewall it if needed.
381ssl_storage_port: 7001
382
383# Address or interface to bind to and tell other Cassandra nodes to connect to.
384# You _must_ change this if you want multiple nodes to be able to communicate!
385#
386# Set listen_address OR listen_interface, not both. Interfaces must correspond
387# to a single address, IP aliasing is not supported.
388#
389# Leaving it blank leaves it up to InetAddress.getLocalHost(). This
390# will always do the Right Thing _if_ the node is properly configured
391# (hostname, name resolution, etc), and the Right Thing is to use the
392# address associated with the hostname (it might not be).
393#
394# Setting listen_address to 0.0.0.0 is always wrong.
395#
396# If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address
397# you can specify which should be chosen using listen_interface_prefer_ipv6. If false the first ipv4
398# address will be used. If true the first ipv6 address will be used. Defaults to false preferring
399# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6.
400listen_address: {{ db_ip }}
401# listen_interface: eth0
402# listen_interface_prefer_ipv6: false
403
404# Address to broadcast to other Cassandra nodes
405# Leaving this blank will set it to the same value as listen_address
406#broadcast_address: 192.168.112.60
407
408# Internode authentication backend, implementing IInternodeAuthenticator;
409# used to allow/disallow connections from peer nodes.
410# internode_authenticator: org.apache.cassandra.auth.AllowAllInternodeAuthenticator
411
412# Whether to start the native transport server.
413# Please note that the address on which the native transport is bound is the
414# same as the rpc_address. The port however is different and specified below.
415start_native_transport: true
416# port for the CQL native transport to listen for clients on
417# For security reasons, you should not expose this port to the internet. Firewall it if needed.
418native_transport_port: 9042
419# The maximum threads for handling requests when the native transport is used.
420# This is similar to rpc_max_threads though the default differs slightly (and
421# there is no native_transport_min_threads, idle threads will always be stopped
422# after 30 seconds).
423# native_transport_max_threads: 128
424#
425# The maximum size of allowed frame. Frame (requests) larger than this will
426# be rejected as invalid. The default is 256MB.
427# native_transport_max_frame_size_in_mb: 256
428
429# The maximum number of concurrent client connections.
430# The default is -1, which means unlimited.
431# native_transport_max_concurrent_connections: -1
432
433# The maximum number of concurrent client connections per source ip.
434# The default is -1, which means unlimited.
435# native_transport_max_concurrent_connections_per_ip: -1
436
437# Whether to start the thrift rpc server.
438start_rpc: true
439
440# The address or interface to bind the Thrift RPC service and native transport
441# server to.
442#
443# Set rpc_address OR rpc_interface, not both. Interfaces must correspond
444# to a single address, IP aliasing is not supported.
445#
446# Leaving rpc_address blank has the same effect as on listen_address
447# (i.e. it will be based on the configured hostname of the node).
448#
449# Note that unlike listen_address, you can specify 0.0.0.0, but you must also
450# set broadcast_rpc_address to a value other than 0.0.0.0.
451#
452# For security reasons, you should not expose this port to the internet. Firewall it if needed.
453#
454# If you choose to specify the interface by name and the interface has an ipv4 and an ipv6 address
455# you can specify which should be chosen using rpc_interface_prefer_ipv6. If false the first ipv4
456# address will be used. If true the first ipv6 address will be used. Defaults to false preferring
457# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6.
458rpc_address: {{ db_ip }}
459# rpc_interface: eth1
460# rpc_interface_prefer_ipv6: false
461
462# port for Thrift to listen for clients on
463rpc_port: 9160
464
465# RPC address to broadcast to drivers and other Cassandra nodes. This cannot
466# be set to 0.0.0.0. If left blank, this will be set to the value of
467# rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must
468# be set.
469# broadcast_rpc_address: 1.2.3.4
470
471# enable or disable keepalive on rpc/native connections
472rpc_keepalive: true
473
474# Cassandra provides two out-of-the-box options for the RPC Server:
475#
476# sync -> One thread per thrift connection. For a very large number of clients, memory
477# will be your limiting factor. On a 64 bit JVM, 180KB is the minimum stack size
478# per thread, and that will correspond to your use of virtual memory (but physical memory
479# may be limited depending on use of stack space).
480#
481# hsha -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
482# asynchronously using a small number of threads that does not vary with the amount
483# of thrift clients (and thus scales well to many clients). The rpc requests are still
484# synchronous (one thread per active request). If hsha is selected then it is essential
485# that rpc_max_threads is changed from the default value of unlimited.
486#
487# The default is sync because on Windows hsha is about 30% slower. On Linux,
488# sync/hsha performance is about the same, with hsha of course using less memory.
489#
490# Alternatively, can provide your own RPC server by providing the fully-qualified class name
491# of an o.a.c.t.TServerFactory that can create an instance of it.
492rpc_server_type: sync
493
494# Uncomment rpc_min|max_thread to set request pool size limits.
495#
496# Regardless of your choice of RPC server (see above), the number of maximum requests in the
497# RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
498# RPC server, it also dictates the number of clients that can be connected at all).
499#
500# The default is unlimited and thus provides no protection against clients overwhelming the server. You are
501# encouraged to set a maximum that makes sense for you in production, but do keep in mind that
502# rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
503#
504# rpc_min_threads: 16
505# rpc_max_threads: 2048
506
507# uncomment to set socket buffer sizes on rpc connections
508# rpc_send_buff_size_in_bytes:
509# rpc_recv_buff_size_in_bytes:
510
511# Uncomment to set socket buffer size for internode communication
512# Note that when setting this, the buffer size is limited by net.core.wmem_max
513# and when not setting it it is defined by net.ipv4.tcp_wmem
514# See:
515# /proc/sys/net/core/wmem_max
516# /proc/sys/net/core/rmem_max
517# /proc/sys/net/ipv4/tcp_wmem
518# /proc/sys/net/ipv4/tcp_wmem
519# and: man tcp
520# internode_send_buff_size_in_bytes:
521# internode_recv_buff_size_in_bytes:
522
523# Frame size for thrift (maximum message length).
524thrift_framed_transport_size_in_mb: 15
525
526# Set to true to have Cassandra create a hard link to each sstable
527# flushed or streamed locally in a backups/ subdirectory of the
528# keyspace data. Removing these links is the operator's
529# responsibility.
530incremental_backups: false
531
532# Whether or not to take a snapshot before each compaction. Be
533# careful using this option, since Cassandra won't clean up the
534# snapshots for you. Mostly useful if you're paranoid when there
535# is a data format change.
536snapshot_before_compaction: false
537
538# Whether or not a snapshot is taken of the data before keyspace truncation
539# or dropping of column families. The STRONGLY advised default of true
540# should be used to provide data safety. If you set this flag to false, you will
541# lose data on truncation or drop.
542auto_snapshot: true
543
544# When executing a scan, within or across a partition, we need to keep the
545# tombstones seen in memory so we can return them to the coordinator, which
546# will use them to make sure other replicas also know about the deleted rows.
547# With workloads that generate a lot of tombstones, this can cause performance
548# problems and even exaust the server heap.
549# (http://www.datastax.com/dev/blog/cassandra-anti-patterns-queues-and-queue-like-datasets)
550# Adjust the thresholds here if you understand the dangers and want to
551# scan more tombstones anyway. These thresholds may also be adjusted at runtime
552# using the StorageService mbean.
553tombstone_warn_threshold: 1000
554tombstone_failure_threshold: 100000
555
556# Granularity of the collation index of rows within a partition.
557# Increase if your rows are large, or if you have a very large
558# number of rows per partition. The competing goals are these:
559# 1) a smaller granularity means more index entries are generated
560# and looking up rows withing the partition by collation column
561# is faster
562# 2) but, Cassandra will keep the collation index in memory for hot
563# rows (as part of the key cache), so a larger granularity means
564# you can cache more hot rows
565column_index_size_in_kb: 64
566
567
568# Log WARN on any batch size exceeding this value. 5kb per batch by default.
569# Caution should be taken on increasing the size of this threshold as it can lead to node instability.
570batch_size_warn_threshold_in_kb: 5
571
572
573# Log WARN on any batches not of type LOGGED than span across more partitions than this limit
574unlogged_batch_across_partitions_warn_threshold: 10
575
576# Number of simultaneous compactions to allow, NOT including
577# validation "compactions" for anti-entropy repair. Simultaneous
578# compactions can help preserve read performance in a mixed read/write
579# workload, by mitigating the tendency of small sstables to accumulate
580# during a single long running compactions. The default is usually
581# fine and if you experience problems with compaction running too
582# slowly or too fast, you should look at
583# compaction_throughput_mb_per_sec first.
584#
585# concurrent_compactors defaults to the smaller of (number of disks,
586# number of cores), with a minimum of 2 and a maximum of 8.
587#
588# If your data directories are backed by SSD, you should increase this
589# to the number of cores.
590#concurrent_compactors: 1
591
592# Throttles compaction to the given total throughput across the entire
593# system. The faster you insert data, the faster you need to compact in
594# order to keep the sstable count down, but in general, setting this to
595# 16 to 32 times the rate you are inserting data is more than sufficient.
596# Setting this to 0 disables throttling. Note that this account for all types
597# of compaction, including validation compaction.
598compaction_throughput_mb_per_sec: 16
599
600# Log a warning when compacting partitions larger than this value
601compaction_large_partition_warning_threshold_mb: 100
602
603# When compacting, the replacement sstable(s) can be opened before they
604# are completely written, and used in place of the prior sstables for
605# any range that has been written. This helps to smoothly transfer reads
606# between the sstables, reducing page cache churn and keeping hot rows hot
607sstable_preemptive_open_interval_in_mb: 50
608
609# Throttles all outbound streaming file transfers on this node to the
610# given total throughput in Mbps. This is necessary because Cassandra does
611# mostly sequential IO when streaming data during bootstrap or repair, which
612# can lead to saturating the network connection and degrading rpc performance.
613# When unset, the default is 200 Mbps or 25 MB/s.
614# stream_throughput_outbound_megabits_per_sec: 200
615
616# Throttles all streaming file transfer between the datacenters,
617# this setting allows users to throttle inter dc stream throughput in addition
618# to throttling all network stream traffic as configured with
619# stream_throughput_outbound_megabits_per_sec
620# When unset, the default is 200 Mbps or 25 MB/s
621# inter_dc_stream_throughput_outbound_megabits_per_sec: 200
622
623# How long the coordinator should wait for read operations to complete
624read_request_timeout_in_ms: 5000
625# How long the coordinator should wait for seq or index scans to complete
626range_request_timeout_in_ms: 10000
627# How long the coordinator should wait for writes to complete
628write_request_timeout_in_ms: 2000
629# How long the coordinator should wait for counter writes to complete
630counter_write_request_timeout_in_ms: 5000
631# How long a coordinator should continue to retry a CAS operation
632# that contends with other proposals for the same row
633cas_contention_timeout_in_ms: 1000
634# How long the coordinator should wait for truncates to complete
635# (This can be much longer, because unless auto_snapshot is disabled
636# we need to flush first so we can snapshot before removing the data.)
637truncate_request_timeout_in_ms: 60000
638# The default timeout for other, miscellaneous operations
639request_timeout_in_ms: 10000
640
641# Enable operation timeout information exchange between nodes to accurately
642# measure request timeouts. If disabled, replicas will assume that requests
643# were forwarded to them instantly by the coordinator, which means that
644# under overload conditions we will waste that much extra time processing
645# already-timed-out requests.
646#
647# Warning: before enabling this property make sure to ntp is installed
648# and the times are synchronized between the nodes.
649cross_node_timeout: false
650
651# Set socket timeout for streaming operation.
652# The stream session is failed if no data/ack is received by any of the participants
653# within that period, which means this should also be sufficient to stream a large
654# sstable or rebuild table indexes.
655# Default value is 86400000ms, which means stale streams timeout after 24 hours.
656# A value of zero means stream sockets should never time out.
657# streaming_socket_timeout_in_ms: 86400000
658
659# phi value that must be reached for a host to be marked down.
660# most users should never need to adjust this.
661# phi_convict_threshold: 8
662
663# endpoint_snitch -- Set this to a class that implements
664# IEndpointSnitch. The snitch has two functions:
665# - it teaches Cassandra enough about your network topology to route
666# requests efficiently
667# - it allows Cassandra to spread replicas around your cluster to avoid
668# correlated failures. It does this by grouping machines into
669# "datacenters" and "racks." Cassandra will do its best not to have
670# more than one replica on the same "rack" (which may not actually
671# be a physical location)
672#
673# CASSANDRA WILL NOT ALLOW YOU TO SWITCH TO AN INCOMPATIBLE SNITCH
674# ONCE DATA IS INSERTED INTO THE CLUSTER. This would cause data loss.
675# This means that if you start with the default SimpleSnitch, which
676# locates every node on "rack1" in "datacenter1", your only options
677# if you need to add another datacenter are GossipingPropertyFileSnitch
678# (and the older PFS). From there, if you want to migrate to an
679# incompatible snitch like Ec2Snitch you can do it by adding new nodes
680# under Ec2Snitch (which will locate them in a new "datacenter") and
681# decommissioning the old ones.
682#
683# Out of the box, Cassandra provides
684# - SimpleSnitch:
685# Treats Strategy order as proximity. This can improve cache
686# locality when disabling read repair. Only appropriate for
687# single-datacenter deployments.
688# - GossipingPropertyFileSnitch
689# This should be your go-to snitch for production use. The rack
690# and datacenter for the local node are defined in
691# cassandra-rackdc.properties and propagated to other nodes via
692# gossip. If cassandra-topology.properties exists, it is used as a
693# fallback, allowing migration from the PropertyFileSnitch.
694# - PropertyFileSnitch:
695# Proximity is determined by rack and data center, which are
696# explicitly configured in cassandra-topology.properties.
697# - Ec2Snitch:
698# Appropriate for EC2 deployments in a single Region. Loads Region
699# and Availability Zone information from the EC2 API. The Region is
700# treated as the datacenter, and the Availability Zone as the rack.
701# Only private IPs are used, so this will not work across multiple
702# Regions.
703# - Ec2MultiRegionSnitch:
704# Uses public IPs as broadcast_address to allow cross-region
705# connectivity. (Thus, you should set seed addresses to the public
706# IP as well.) You will need to open the storage_port or
707# ssl_storage_port on the public IP firewall. (For intra-Region
708# traffic, Cassandra will switch to the private IP after
709# establishing a connection.)
710# - RackInferringSnitch:
711# Proximity is determined by rack and data center, which are
712# assumed to correspond to the 3rd and 2nd octet of each node's IP
713# address, respectively. Unless this happens to match your
714# deployment conventions, this is best used as an example of
715# writing a custom Snitch class and is provided in that spirit.
716#
717# You can use a custom Snitch by setting this to the full class name
718# of the snitch, which will be assumed to be on your classpath.
719endpoint_snitch: GossipingPropertyFileSnitch
720
721# controls how often to perform the more expensive part of host score
722# calculation
723dynamic_snitch_update_interval_in_ms: 100
724# controls how often to reset all host scores, allowing a bad host to
725# possibly recover
726dynamic_snitch_reset_interval_in_ms: 600000
727# if set greater than zero and read_repair_chance is < 1.0, this will allow
728# 'pinning' of replicas to hosts in order to increase cache capacity.
729# The badness threshold will control how much worse the pinned host has to be
730# before the dynamic snitch will prefer other replicas over it. This is
731# expressed as a double which represents a percentage. Thus, a value of
732# 0.2 means Cassandra would continue to prefer the static snitch values
733# until the pinned host was 20% worse than the fastest.
734dynamic_snitch_badness_threshold: 0.1
735
736# request_scheduler -- Set this to a class that implements
737# RequestScheduler, which will schedule incoming client requests
738# according to the specific policy. This is useful for multi-tenancy
739# with a single Cassandra cluster.
740# NOTE: This is specifically for requests from the client and does
741# not affect inter node communication.
742# org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
743# org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
744# client requests to a node with a separate queue for each
745# request_scheduler_id. The scheduler is further customized by
746# request_scheduler_options as described below.
747request_scheduler: org.apache.cassandra.scheduler.NoScheduler
748
749# Scheduler Options vary based on the type of scheduler
750# NoScheduler - Has no options
751# RoundRobin
752# - throttle_limit -- The throttle_limit is the number of in-flight
753# requests per client. Requests beyond
754# that limit are queued up until
755# running requests can complete.
756# The value of 80 here is twice the number of
757# concurrent_reads + concurrent_writes.
758# - default_weight -- default_weight is optional and allows for
759# overriding the default which is 1.
760# - weights -- Weights are optional and will default to 1 or the
761# overridden default_weight. The weight translates into how
762# many requests are handled during each turn of the
763# RoundRobin, based on the scheduler id.
764#
765# request_scheduler_options:
766# throttle_limit: 80
767# default_weight: 5
768# weights:
769# Keyspace1: 1
770# Keyspace2: 5
771
772# request_scheduler_id -- An identifier based on which to perform
773# the request scheduling. Currently the only valid option is keyspace.
774# request_scheduler_id: keyspace
775
776# Enable or disable inter-node encryption
777# Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
778# users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
779# suite for authentication, key exchange and encryption of the actual data transfers.
780# Use the DHE/ECDHE ciphers if running in FIPS 140 compliant mode.
781# NOTE: No custom encryption options are enabled at the moment
782# The available internode options are : all, none, dc, rack
783#
784# If set to dc cassandra will encrypt the traffic between the DCs
785# If set to rack cassandra will encrypt the traffic between the racks
786#
787# The passwords used in these options must match the passwords used when generating
788# the keystore and truststore. For instructions on generating these files, see:
789# http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
790#
791server_encryption_options:
792 internode_encryption: none
793 keystore: conf/.keystore
794 keystore_password: cassandra
795 truststore: conf/.truststore
796 truststore_password: cassandra
797 # More advanced defaults below:
798 # protocol: TLS
799 # algorithm: SunX509
800 # store_type: JKS
801 # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA]
802 # require_client_auth: false
803
804# enable or disable client/server encryption.
805client_encryption_options:
806 enabled: false
807 # If enabled and optional is set to true encrypted and unencrypted connections are handled.
808 optional: false
809 keystore: conf/.keystore
810 keystore_password: cassandra
811 # require_client_auth: false
812 # Set trustore and truststore_password if require_client_auth is true
813 # truststore: conf/.truststore
814 # truststore_password: cassandra
815 # More advanced defaults below:
816 # protocol: TLS
817 # algorithm: SunX509
818 # store_type: JKS
819 # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA]
820
821# internode_compression controls whether traffic between nodes is
822# compressed.
823# can be: all - all traffic is compressed
824# dc - traffic between different datacenters is compressed
825# none - nothing is compressed.
826internode_compression: all
827
828# Enable or disable tcp_nodelay for inter-dc communication.
829# Disabling it will result in larger (but fewer) network packets being sent,
830# reducing overhead from the TCP protocol itself, at the cost of increasing
831# latency if you block for cross-datacenter responses.
832inter_dc_tcp_nodelay: false
833
834# GC Pauses greater than gc_warn_threshold_in_ms will be logged at WARN level
835# Adjust the threshold based on your application throughput requirement
836# By default, Cassandra logs GC Pauses greater than 200 ms at INFO level
837# gc_warn_threshold_in_ms: 1000