github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/cassandra/image/files/cassandra.yaml (about)

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