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