Guest User

cassandra.yaml

a guest
Mar 7th, 2013
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 30.83 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: 'Stage 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.
  21. #
  22. # If you already have a cluster with 1 token per node, and wish to migrate to
  23. # multiple tokens per node, see http://wiki.apache.org/cassandra/Operations
  24. num_tokens: 256
  25.  
  26. # If you haven't specified num_tokens, or have set it to the default of 1 then
  27. # you should always specify InitialToken when setting up a production
  28. # cluster for the first time, and often when adding capacity later.
  29. # The principle is that each node should be given an equal slice of
  30. # the token ring; see http://wiki.apache.org/cassandra/Operations
  31. # for more details.
  32. #
  33. # If blank, Cassandra will request a token bisecting the range of
  34. # the heaviest-loaded existing node.  If there is no load information
  35. # available, such as is the case with a new cluster, it will pick
  36. # a random token, which will lead to hot spots.
  37. # initial_token:
  38.  
  39. # See http://wiki.apache.org/cassandra/HintedHandoff
  40. hinted_handoff_enabled: true
  41. # this defines the maximum amount of time a dead host will have hints
  42. # generated.  After it has been dead this long, new hints for it will not be
  43. # created until it has been seen alive and gone down again.
  44. max_hint_window_in_ms: 3600000 # 1 hour
  45. # throttle in KB's per second, per delivery thread
  46. hinted_handoff_throttle_in_kb: 1024  # 1MB
  47. # Number of threads with which to deliver hints;
  48. # Consider increasing this number when you have multi-dc deployments, since
  49. # cross-dc handoff tends to be slower
  50. max_hints_delivery_threads: 2
  51.  
  52. # The following setting populates the page cache on memtable flush and compaction
  53. # WARNING: Enable this setting only when the whole node's data fits in memory.
  54. # Defaults to: false
  55. # populate_io_cache_on_flush: false
  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: org.apache.cassandra.auth.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: org.apache.cassandra.auth.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. # The partitioner is responsible for distributing rows (by key) across
  83. # nodes in the cluster.  Any IPartitioner may be used, including your
  84. # own as long as it is on the classpath.  Out of the box, Cassandra
  85. # provides org.apache.cassandra.dht.{Murmur3Partitioner, RandomPartitioner
  86. # ByteOrderedPartitioner, OrderPreservingPartitioner (deprecated)}.
  87. #
  88. # - RandomPartitioner distributes rows across the cluster evenly by md5.
  89. #   This is the default prior to 1.2 and is retained for compatibility.
  90. # - Murmur3Partitioner is similar to RandomPartioner but uses Murmur3_128
  91. #   Hash Function instead of md5.  When in doubt, this is the best option.
  92. # - ByteOrderedPartitioner orders rows lexically by key bytes.  BOP allows
  93. #   scanning rows in key order, but the ordering can generate hot spots
  94. #   for sequential insertion workloads.
  95. # - OrderPreservingPartitioner is an obsolete form of BOP, that stores
  96. # - keys in a less-efficient format and only works with keys that are
  97. #   UTF8-encoded Strings.
  98. # - CollatingOPP colates according to EN,US rules rather than lexical byte
  99. #   ordering.  Use this as an example if you need custom collation.
  100. #
  101. # See http://wiki.apache.org/cassandra/Operations for more on
  102. # partitioners and token selection.
  103. partitioner: org.apache.cassandra.dht.Murmur3Partitioner
  104.  
  105. # directories where Cassandra should store data on disk.
  106. data_file_directories:
  107.    - /data/cassandra/datafiles
  108.  
  109. # commit log
  110. commitlog_directory: /journal/cassandra/commitlogs
  111.  
  112. # policy for data disk failures:
  113. # stop: shut down gossip and Thrift, leaving the node effectively dead, but
  114. #       still inspectable via JMX.
  115. # best_effort: stop using the failed disk and respond to requests based on
  116. #              remaining available sstables.  This means you WILL see obsolete
  117. #              data at CL.ONE!
  118. # ignore: ignore fatal errors and let requests fail, as in pre-1.2 Cassandra
  119. disk_failure_policy: stop
  120.  
  121. # Maximum size of the key cache in memory.
  122. #
  123. # Each key cache hit saves 1 seek and each row cache hit saves 2 seeks at the
  124. # minimum, sometimes more. The key cache is fairly tiny for the amount of
  125. # time it saves, so it's worthwhile to use it at large numbers.
  126. # The row cache saves even more time, but must store the whole values of
  127. # its rows, so it is extremely space-intensive. It's best to only use the
  128. # row cache if you have hot rows or static rows.
  129. #
  130. # NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
  131. #
  132. # Default value is empty to make it "auto" (min(5% of Heap (in MB), 100MB)). Set to 0 to disable key cache.
  133. key_cache_size_in_mb:
  134. # Duration in seconds after which Cassandra should
  135. # safe the keys cache. Caches are saved to saved_caches_directory as
  136. # specified in this configuration file.
  137. #
  138. # Saved caches greatly improve cold-start speeds, and is relatively cheap in
  139. # terms of I/O for the key cache. Row cache saving is much more expensive and
  140. # has limited use.
  141. #
  142. # Default is 14400 or 4 hours.
  143. key_cache_save_period: 14400
  144.  
  145. # Number of keys from the key cache to save
  146. # Disabled by default, meaning all keys are going to be saved
  147. # key_cache_keys_to_save: 100
  148.  
  149. # Maximum size of the row cache in memory.
  150. # NOTE: if you reduce the size, you may not get you hottest keys loaded on startup.
  151. #
  152. # Default value is 0, to disable row caching.
  153. row_cache_size_in_mb: 0
  154.  
  155. # Duration in seconds after which Cassandra should
  156. # safe the row cache. Caches are saved to saved_caches_directory as specified
  157. # in this configuration file.
  158. #
  159. # Saved caches greatly improve cold-start speeds, and is relatively cheap in
  160. # terms of I/O for the key cache. Row cache saving is much more expensive and
  161. # has limited use.
  162. #
  163. # Default is 0 to disable saving the row cache.
  164. row_cache_save_period: 0
  165.  
  166. # Number of keys from the row cache to save
  167. # Disabled by default, meaning all keys are going to be saved
  168. # row_cache_keys_to_save: 100
  169.  
  170. # The provider for the row cache to use.
  171. #
  172. # Supported values are: ConcurrentLinkedHashCacheProvider, SerializingCacheProvider
  173. #
  174. # SerializingCacheProvider serialises the contents of the row and stores
  175. # it in native memory, i.e., off the JVM Heap. Serialized rows take
  176. # significantly less memory than "live" rows in the JVM, so you can cache
  177. # more rows in a given memory footprint.  And storing the cache off-heap
  178. # means you can use smaller heap sizes, reducing the impact of GC pauses.
  179. #
  180. # It is also valid to specify the fully-qualified class name to a class
  181. # that implements org.apache.cassandra.cache.IRowCacheProvider.
  182. #
  183. # Defaults to SerializingCacheProvider
  184. row_cache_provider: SerializingCacheProvider
  185.  
  186. # saved caches
  187. saved_caches_directory: /data/cassandra/saved_caches
  188.  
  189. # commitlog_sync may be either "periodic" or "batch."
  190. # When in batch mode, Cassandra won't ack writes until the commit log
  191. # has been fsynced to disk.  It will wait up to
  192. # commitlog_sync_batch_window_in_ms milliseconds for other writes, before
  193. # performing the sync.
  194. #
  195. # commitlog_sync: batch
  196. # commitlog_sync_batch_window_in_ms: 50
  197. #
  198. # the other option is "periodic" where writes may be acked immediately
  199. # and the CommitLog is simply synced every commitlog_sync_period_in_ms
  200. # milliseconds.
  201. commitlog_sync: periodic
  202. commitlog_sync_period_in_ms: 10000
  203.  
  204. # The size of the individual commitlog file segments.  A commitlog
  205. # segment may be archived, deleted, or recycled once all the data
  206. # in it (potentally from each columnfamily in the system) has been
  207. # flushed to sstables.  
  208. #
  209. # The default size is 32, which is almost always fine, but if you are
  210. # archiving commitlog segments (see commitlog_archiving.properties),
  211. # then you probably want a finer granularity of archiving; 8 or 16 MB
  212. # is reasonable.
  213. commitlog_segment_size_in_mb: 32
  214.  
  215. # any class that implements the SeedProvider interface and has a
  216. # constructor that takes a Map<String, String> of parameters will do.
  217. seed_provider:
  218.    # Addresses of hosts that are deemed contact points.
  219.     # Cassandra nodes use this list of hosts to find each other and learn
  220.     # the topology of the ring.  You must change this if you are running
  221.     # multiple nodes!
  222.     - class_name: org.apache.cassandra.locator.SimpleSeedProvider
  223.       parameters:
  224.          # seeds is actually a comma-delimited list of addresses.
  225.           # Ex: "<ip1>,<ip2>,<ip3>"
  226.           - seeds: "10.202.203.200,10.202.203.201,10.202.203.202"
  227.  
  228. # emergency pressure valve: each time heap usage after a full (CMS)
  229. # garbage collection is above this fraction of the max, Cassandra will
  230. # flush the largest memtables.  
  231. #
  232. # Set to 1.0 to disable.  Setting this lower than
  233. # CMSInitiatingOccupancyFraction is not likely to be useful.
  234. #
  235. # RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
  236. # it is most effective under light to moderate load, or read-heavy
  237. # workloads; under truly massive write load, it will often be too
  238. # little, too late.
  239. flush_largest_memtables_at: 0.75
  240.  
  241. # emergency pressure valve #2: the first time heap usage after a full
  242. # (CMS) garbage collection is above this fraction of the max,
  243. # Cassandra will reduce cache maximum _capacity_ to the given fraction
  244. # of the current _size_.  Should usually be set substantially above
  245. # flush_largest_memtables_at, since that will have less long-term
  246. # impact on the system.  
  247. #
  248. # Set to 1.0 to disable.  Setting this lower than
  249. # CMSInitiatingOccupancyFraction is not likely to be useful.
  250. reduce_cache_sizes_at: 0.85
  251. reduce_cache_capacity_to: 0.6
  252.  
  253. # For workloads with more data than can fit in memory, Cassandra's
  254. # bottleneck will be reads that need to fetch data from
  255. # disk. "concurrent_reads" should be set to (16 * number_of_drives) in
  256. # order to allow the operations to enqueue low enough in the stack
  257. # that the OS and drives can reorder them.
  258. #
  259. # On the other hand, since writes are almost never IO bound, the ideal
  260. # number of "concurrent_writes" is dependent on the number of cores in
  261. # your system; (8 * number_of_cores) is a good rule of thumb.
  262. concurrent_reads: 32
  263. concurrent_writes: 32
  264.  
  265. # Total memory to use for memtables.  Cassandra will flush the largest
  266. # memtable when this much memory is used.
  267. # If omitted, Cassandra will set it to 1/3 of the heap.
  268. # memtable_total_space_in_mb: 2048
  269.  
  270. # Total space to use for commitlogs.  Since commitlog segments are
  271. # mmapped, and hence use up address space, the default size is 32
  272. # on 32-bit JVMs, and 1024 on 64-bit JVMs.
  273. #
  274. # If space gets above this value (it will round up to the next nearest
  275. # segment multiple), Cassandra will flush every dirty CF in the oldest
  276. # segment and remove it.  So a small total commitlog space will tend
  277. # to cause more flush activity on less-active columnfamilies.
  278. # commitlog_total_space_in_mb: 4096
  279.  
  280. # This sets the amount of memtable flush writer threads.  These will
  281. # be blocked by disk io, and each one will hold a memtable in memory
  282. # while blocked. If you have a large heap and many data directories,
  283. # you can increase this value for better flush performance.
  284. # By default this will be set to the amount of data directories defined.
  285. #memtable_flush_writers: 1
  286.  
  287. # the number of full memtables to allow pending flush, that is,
  288. # waiting for a writer thread.  At a minimum, this should be set to
  289. # the maximum number of secondary indexes created on a single CF.
  290. memtable_flush_queue_size: 4
  291.  
  292. # Whether to, when doing sequential writing, fsync() at intervals in
  293. # order to force the operating system to flush the dirty
  294. # buffers. Enable this to avoid sudden dirty buffer flushing from
  295. # impacting read latencies. Almost always a good idea on SSD:s; not
  296. # necessarily on platters.
  297. trickle_fsync: false
  298. trickle_fsync_interval_in_kb: 10240
  299.  
  300. # TCP port, for commands and data
  301. storage_port: 7000
  302.  
  303. # SSL port, for encrypted communication.  Unused unless enabled in
  304. # encryption_options
  305. ssl_storage_port: 7001
  306.  
  307. # Address to bind to and tell other Cassandra nodes to connect to. You
  308. # _must_ change this if you want multiple nodes to be able to
  309. # communicate!
  310. #
  311. # Leaving it blank leaves it up to InetAddress.getLocalHost(). This
  312. # will always do the Right Thing *if* the node is properly configured
  313. # (hostname, name resolution, etc), and the Right Thing is to use the
  314. # address associated with the hostname (it might not be).
  315. #
  316. # Setting this to 0.0.0.0 is always wrong.
  317. listen_address: 10.202.203.200
  318.  
  319. # Address to broadcast to other Cassandra nodes
  320. # Leaving this blank will set it to the same value as listen_address
  321. # broadcast_address: 1.2.3.4
  322.  
  323.  
  324. # Whether to start the native transport server.
  325. # Currently, only the thrift server is started by default because the native
  326. # transport is considered beta.
  327. # Please note that the address on which the native transport is bound is the
  328. # same as the rpc_address. The port however is different and specified below.
  329. start_native_transport: false
  330. # port for the CQL native transport to listen for clients on
  331. native_transport_port: 9042
  332. # The minimum and maximum threads for handling requests when the native
  333. # transport is used. The meaning is those is similar to the one of
  334. # rpc_min_threads and rpc_max_threads, though the default differ slightly and
  335. # are the ones below:
  336. # native_transport_min_threads: 16
  337. # native_transport_max_threads: 128
  338.  
  339. # Whether to start the thrift rpc server.
  340. start_rpc: true
  341. # The address to bind the Thrift RPC service to -- clients connect
  342. # here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
  343. # you want Thrift to listen on all interfaces.
  344. #
  345. # Leaving this blank has the same effect it does for ListenAddress,
  346. # (i.e. it will be based on the configured hostname of the node).
  347. rpc_address: <SANITIZED>
  348. # port for Thrift to listen for clients on
  349. rpc_port: 9160
  350.  
  351. # enable or disable keepalive on rpc connections
  352. rpc_keepalive: true
  353.  
  354. # Cassandra provides three out-of-the-box options for the RPC Server:
  355. #
  356. # sync  -> One thread per thrift connection. For a very large number of clients, memory
  357. #          will be your limiting factor. On a 64 bit JVM, 128KB is the minimum stack size
  358. #          per thread, and that will correspond to your use of virtual memory (but physical memory
  359. #          may be limited depending on use of stack space).
  360. #
  361. # hsha  -> Stands for "half synchronous, half asynchronous." All thrift clients are handled
  362. #          asynchronously using a small number of threads that does not vary with the amount
  363. #          of thrift clients (and thus scales well to many clients). The rpc requests are still
  364. #          synchronous (one thread per active request).
  365. #
  366. # The default is sync because on Windows hsha is about 30% slower.  On Linux,
  367. # sync/hsha performance is about the same, with hsha of course using less memory.
  368. #
  369. # Alternatively,  can provide your own RPC server by providing the fully-qualified class name
  370. # of an o.a.c.t.TServerFactory that can create an instance of it.
  371. rpc_server_type: hsha
  372.  
  373. # Uncomment rpc_min|max_thread to set request pool size limits.
  374. #
  375. # Regardless of your choice of RPC server (see above), the number of maximum requests in the
  376. # RPC thread pool dictates how many concurrent requests are possible (but if you are using the sync
  377. # RPC server, it also dictates the number of clients that can be connected at all).
  378. #
  379. # The default is unlimited and thus provide no protection against clients overwhelming the server. You are
  380. # encouraged to set a maximum that makes sense for you in production, but do keep in mind that
  381. # rpc_max_threads represents the maximum number of client requests this server may execute concurrently.
  382. #
  383. # rpc_min_threads: 16
  384. # rpc_max_threads: 2048
  385.  
  386. # uncomment to set socket buffer sizes on rpc connections
  387. # rpc_send_buff_size_in_bytes:
  388. # rpc_recv_buff_size_in_bytes:
  389.  
  390. # uncomment to set socket buffer size for internode communication
  391. # internode_send_buff_size_in_bytes:
  392. # internode_recv_buff_size_in_bytes:
  393.  
  394. # Frame size for thrift (maximum field length).
  395. thrift_framed_transport_size_in_mb: 15
  396.  
  397. # The max length of a thrift message, including all fields and
  398. # internal thrift overhead.
  399. thrift_max_message_length_in_mb: 16
  400.  
  401. # Set to true to have Cassandra create a hard link to each sstable
  402. # flushed or streamed locally in a backups/ subdirectory of the
  403. # Keyspace data.  Removing these links is the operator's
  404. # responsibility.
  405. incremental_backups: false
  406.  
  407. # Whether or not to take a snapshot before each compaction.  Be
  408. # careful using this option, since Cassandra won't clean up the
  409. # snapshots for you.  Mostly useful if you're paranoid when there
  410. # is a data format change.
  411. snapshot_before_compaction: false
  412.  
  413. # Whether or not a snapshot is taken of the data before keyspace truncation
  414. # or dropping of column families. The STRONGLY advised default of true
  415. # should be used to provide data safety. If you set this flag to false, you will
  416. # lose data on truncation or drop.
  417. auto_snapshot: true
  418.  
  419. # Add column indexes to a row after its contents reach this size.
  420. # Increase if your column values are large, or if you have a very large
  421. # number of columns.  The competing causes are, Cassandra has to
  422. # deserialize this much of the row to read a single column, so you want
  423. # it to be small - at least if you do many partial-row reads - but all
  424. # the index data is read for each access, so you don't want to generate
  425. # that wastefully either.
  426. column_index_size_in_kb: 64
  427.  
  428. # Size limit for rows being compacted in memory.  Larger rows will spill
  429. # over to disk and use a slower two-pass compaction process.  A message
  430. # will be logged specifying the row key.
  431. in_memory_compaction_limit_in_mb: 64
  432.  
  433. # Number of simultaneous compactions to allow, NOT including
  434. # validation "compactions" for anti-entropy repair.  Simultaneous
  435. # compactions can help preserve read performance in a mixed read/write
  436. # workload, by mitigating the tendency of small sstables to accumulate
  437. # during a single long running compactions. The default is usually
  438. # fine and if you experience problems with compaction running too
  439. # slowly or too fast, you should look at
  440. # compaction_throughput_mb_per_sec first.
  441. #
  442. # concurrent_compactors defaults to the number of cores.
  443. # Uncomment to make compaction mono-threaded, the pre-0.8 default.
  444. concurrent_compactors: 4
  445.  
  446. # Multi-threaded compaction. When enabled, each compaction will use
  447. # up to one thread per core, plus one thread per sstable being merged.
  448. # This is usually only useful for SSD-based hardware: otherwise,
  449. # your concern is usually to get compaction to do LESS i/o (see:
  450. # compaction_throughput_mb_per_sec), not more.
  451. multithreaded_compaction: false
  452.  
  453. # Throttles compaction to the given total throughput across the entire
  454. # system. The faster you insert data, the faster you need to compact in
  455. # order to keep the sstable count down, but in general, setting this to
  456. # 16 to 32 times the rate you are inserting data is more than sufficient.
  457. # Setting this to 0 disables throttling. Note that this account for all types
  458. # of compaction, including validation compaction.
  459. compaction_throughput_mb_per_sec: 80
  460.  
  461. # Track cached row keys during compaction, and re-cache their new
  462. # positions in the compacted sstable.  Disable if you use really large
  463. # key caches.
  464. compaction_preheat_key_cache: true
  465.  
  466. # Throttles all outbound streaming file transfers on this node to the
  467. # given total throughput in Mbps. This is necessary because Cassandra does
  468. # mostly sequential IO when streaming data during bootstrap or repair, which
  469. # can lead to saturating the network connection and degrading rpc performance.
  470. # When unset, the default is 400 Mbps or 50 MB/s.
  471. # stream_throughput_outbound_megabits_per_sec: 400
  472.  
  473. # How long the coordinator should wait for read operations to complete
  474. read_request_timeout_in_ms: 10000
  475. # How long the coordinator should wait for seq or index scans to complete
  476. range_request_timeout_in_ms: 10000
  477. # How long the coordinator should wait for writes to complete
  478. write_request_timeout_in_ms: 10000
  479. # How long the coordinator should wait for truncates to complete
  480. # (This can be much longer, because unless auto_snapshot is disabled
  481. # we need to flush first so we can snapshot before removing the data.)
  482. truncate_request_timeout_in_ms: 60000
  483. # The default timeout for other, miscellaneous operations
  484. request_timeout_in_ms: 10000
  485.  
  486. # Enable operation timeout information exchange between nodes to accurately
  487. # measure request timeouts, If disabled cassandra will assuming the request
  488. # was forwarded to the replica instantly by the coordinator
  489. #
  490. # Warning: before enabling this property make sure to ntp is installed
  491. # and the times are synchronized between the nodes.
  492. cross_node_timeout: false
  493.  
  494. # Enable socket timeout for streaming operation.
  495. # When a timeout occurs during streaming, streaming is retried from the start
  496. # of the current file. This *can* involve re-streaming an important amount of
  497. # data, so you should avoid setting the value too low.
  498. # Default value is 0, which never timeout streams.
  499. # streaming_socket_timeout_in_ms: 0
  500.  
  501. # phi value that must be reached for a host to be marked down.
  502. # most users should never need to adjust this.
  503. # phi_convict_threshold: 8
  504.  
  505. # endpoint_snitch -- Set this to a class that implements
  506. # IEndpointSnitch.  The snitch has two functions:
  507. # - it teaches Cassandra enough about your network topology to route
  508. #   requests efficiently
  509. # - it allows Cassandra to spread replicas around your cluster to avoid
  510. #   correlated failures. It does this by grouping machines into
  511. #   "datacenters" and "racks."  Cassandra will do its best not to have
  512. #   more than one replica on the same "rack" (which may not actually
  513. #   be a physical location)
  514. #
  515. # IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
  516. # YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
  517. # ARE PLACED.
  518. #
  519. # Out of the box, Cassandra provides
  520. #  - SimpleSnitch:
  521. #    Treats Strategy order as proximity. This improves cache locality
  522. #    when disabling read repair, which can further improve throughput.
  523. #    Only appropriate for single-datacenter deployments.
  524. #  - PropertyFileSnitch:
  525. #    Proximity is determined by rack and data center, which are
  526. #    explicitly configured in cassandra-topology.properties.
  527. #  - GossipingPropertyFileSnitch
  528. #    The rack and datacenter for the local node are defined in
  529. #    cassandra-rackdc.properties and propagated to other nodes via gossip.  If
  530. #    cassandra-topology.properties exists, it is used as a fallback, allowing
  531. #    migration from the PropertyFileSnitch.
  532. #  - RackInferringSnitch:
  533. #    Proximity is determined by rack and data center, which are
  534. #    assumed to correspond to the 3rd and 2nd octet of each node's
  535. #    IP address, respectively.  Unless this happens to match your
  536. #    deployment conventions (as it did Facebook's), this is best used
  537. #    as an example of writing a custom Snitch class.
  538. #  - Ec2Snitch:
  539. #    Appropriate for EC2 deployments in a single Region.  Loads Region
  540. #    and Availability Zone information from the EC2 API. The Region is
  541. #    treated as the Datacenter, and the Availability Zone as the rack.
  542. #    Only private IPs are used, so this will not work across multiple
  543. #    Regions.
  544. #  - Ec2MultiRegionSnitch:
  545. #    Uses public IPs as broadcast_address to allow cross-region
  546. #    connectivity.  (Thus, you should set seed addresses to the public
  547. #    IP as well.) You will need to open the storage_port or
  548. #    ssl_storage_port on the public IP firewall.  (For intra-Region
  549. #    traffic, Cassandra will switch to the private IP after
  550. #    establishing a connection.)
  551. #
  552. # You can use a custom Snitch by setting this to the full class name
  553. # of the snitch, which will be assumed to be on your classpath.
  554. endpoint_snitch: SimpleSnitch
  555.  
  556. # controls how often to perform the more expensive part of host score
  557. # calculation
  558. dynamic_snitch_update_interval_in_ms: 100
  559. # controls how often to reset all host scores, allowing a bad host to
  560. # possibly recover
  561. dynamic_snitch_reset_interval_in_ms: 600000
  562. # if set greater than zero and read_repair_chance is < 1.0, this will allow
  563. # 'pinning' of replicas to hosts in order to increase cache capacity.
  564. # The badness threshold will control how much worse the pinned host has to be
  565. # before the dynamic snitch will prefer other replicas over it.  This is
  566. # expressed as a double which represents a percentage.  Thus, a value of
  567. # 0.2 means Cassandra would continue to prefer the static snitch values
  568. # until the pinned host was 20% worse than the fastest.
  569. dynamic_snitch_badness_threshold: 0.1
  570.  
  571. # request_scheduler -- Set this to a class that implements
  572. # RequestScheduler, which will schedule incoming client requests
  573. # according to the specific policy. This is useful for multi-tenancy
  574. # with a single Cassandra cluster.
  575. # NOTE: This is specifically for requests from the client and does
  576. # not affect inter node communication.
  577. # org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
  578. # org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
  579. # client requests to a node with a separate queue for each
  580. # request_scheduler_id. The scheduler is further customized by
  581. # request_scheduler_options as described below.
  582. request_scheduler: org.apache.cassandra.scheduler.NoScheduler
  583.  
  584. # Scheduler Options vary based on the type of scheduler
  585. # NoScheduler - Has no options
  586. # RoundRobin
  587. #  - throttle_limit -- The throttle_limit is the number of in-flight
  588. #                      requests per client.  Requests beyond
  589. #                      that limit are queued up until
  590. #                      running requests can complete.
  591. #                      The value of 80 here is twice the number of
  592. #                      concurrent_reads + concurrent_writes.
  593. #  - default_weight -- default_weight is optional and allows for
  594. #                      overriding the default which is 1.
  595. #  - weights -- Weights are optional and will default to 1 or the
  596. #               overridden default_weight. The weight translates into how
  597. #               many requests are handled during each turn of the
  598. #               RoundRobin, based on the scheduler id.
  599. #
  600. # request_scheduler_options:
  601. #    throttle_limit: 80
  602. #    default_weight: 5
  603. #    weights:
  604. #      Keyspace1: 1
  605. #      Keyspace2: 5
  606.  
  607. # request_scheduler_id -- An identifer based on which to perform
  608. # the request scheduling. Currently the only valid option is keyspace.
  609. # request_scheduler_id: keyspace
  610.  
  611. # index_interval controls the sampling of entries from the primrary
  612. # row index in terms of space versus time.  The larger the interval,
  613. # the smaller and less effective the sampling will be.  In technicial
  614. # terms, the interval coresponds to the number of index entries that
  615. # are skipped between taking each sample.  All the sampled entries
  616. # must fit in memory.  Generally, a value between 128 and 512 here
  617. # coupled with a large key cache size on CFs results in the best trade
  618. # offs.  This value is not often changed, however if you have many
  619. # very small rows (many to an OS page), then increasing this will
  620. # often lower memory usage without a impact on performance.
  621. index_interval: 128
  622.  
  623. # Enable or disable inter-node encryption
  624. # Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
  625. # users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
  626. # suite for authentication, key exchange and encryption of the actual data transfers.
  627. # NOTE: No custom encryption options are enabled at the moment
  628. # The available internode options are : all, none, dc, rack
  629. #
  630. # If set to dc cassandra will encrypt the traffic between the DCs
  631. # If set to rack cassandra will encrypt the traffic between the racks
  632. #
  633. # The passwords used in these options must match the passwords used when generating
  634. # the keystore and truststore.  For instructions on generating these files, see:
  635. # http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
  636. #
  637. server_encryption_options:
  638.     internode_encryption: none
  639.     keystore: conf/.keystore
  640.     keystore_password: cassandra
  641.     truststore: conf/.truststore
  642.     truststore_password: cassandra
  643.     # More advanced defaults below:
  644.     # protocol: TLS
  645.     # algorithm: SunX509
  646.     # store_type: JKS
  647.     # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
  648.     # require_client_auth: false
  649.  
  650. # enable or disable client/server encryption.
  651. client_encryption_options:
  652.     enabled: false
  653.     keystore: conf/.keystore
  654.     keystore_password: cassandra
  655.     # More advanced defaults below:
  656.     # protocol: TLS
  657.     # algorithm: SunX509
  658.     # store_type: JKS
  659.     # cipher_suites: [TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA]
  660.     # require_client_auth: false
  661.  
  662. # internode_compression controls whether traffic between nodes is
  663. # compressed.
  664. # can be:  all  - all traffic is compressed
  665. #          dc   - traffic between different datacenters is compressed
  666. #          none - nothing is compressed.
  667. internode_compression: all
  668.  
  669. # Enable or disable tcp_nodelay for inter-dc communication.
  670. # Disabling it will result in larger (but fewer) network packets being sent,
  671. # reducing overhead from the TCP protocol itself, at the cost of increasing
  672. # latency if you block for cross-datacenter responses.
  673. inter_dc_tcp_nodelay: true
Advertisement
Add Comment
Please, Sign In to add comment