Advertisement
Guest User

cassandra.yml

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