cassandra.yaml 31 KB

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