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