github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cmd/roachprod/install/cassandra_yaml.go (about)

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