Advertisement
shutyaev

Untitled

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