Advertisement
Guest User

Cassandra Yaml

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