Guest User

Cassnadra.yaml

a guest
Aug 8th, 2011
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.42 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. # You should always specify InitialToken when setting up a production
  13. # cluster for the first time, and often when adding capacity later.
  14. # The principle is that each node should be given an equal slice of
  15. # the token ring; see http://wiki.apache.org/cassandra/Operations
  16. # for more details.
  17. #
  18. # If blank, Cassandra will request a token bisecting the range of
  19. # the heaviest-loaded existing node. If there is no load information
  20. # available, such as is the case with a new cluster, it will pick
  21. # a random token, which will lead to hot spots.
  22. initial_token:
  23.  
  24. # Set to true to make new [non-seed] nodes automatically migrate data
  25. # to themselves from the pre-existing nodes in the cluster. Defaults
  26. # to false because you can only bootstrap N machines at a time from
  27. # an existing cluster of N, so if you are bringing up a cluster of
  28. # 10 machines with 3 seeds you would have to do it in stages. Leaving
  29. # this off for the initial start simplifies that.
  30. auto_bootstrap: false
  31.  
  32. # See http://wiki.apache.org/cassandra/HintedHandoff
  33. hinted_handoff_enabled: true
  34. # this defines the maximum amount of time a dead host will have hints
  35. # generated. After it has been dead this long, hints will be dropped.
  36. max_hint_window_in_ms: 3600000 # one hour
  37. # Sleep this long after delivering each row or row fragment
  38. hinted_handoff_throttle_delay_in_ms: 50
  39.  
  40. # authentication backend, implementing IAuthenticator; used to identify users
  41. authenticator: org.apache.cassandra.auth.AllowAllAuthenticator
  42.  
  43. # authorization backend, implementing IAuthority; used to limit access/provide permissions
  44. authority: org.apache.cassandra.auth.AllowAllAuthority
  45.  
  46. # The partitioner is responsible for distributing rows (by key) across
  47. # nodes in the cluster. Any IPartitioner may be used, including your
  48. # own as long as it is on the classpath. Out of the box, Cassandra
  49. # provides org.apache.cassandra.dht.RandomPartitioner
  50. # org.apache.cassandra.dht.ByteOrderedPartitioner,
  51. # org.apache.cassandra.dht.OrderPreservingPartitioner (deprecated),
  52. # and org.apache.cassandra.dht.CollatingOrderPreservingPartitioner
  53. # (deprecated).
  54. #
  55. # - RandomPartitioner distributes rows across the cluster evenly by md5.
  56. # When in doubt, this is the best option.
  57. # - ByteOrderedPartitioner orders rows lexically by key bytes. BOP allows
  58. # scanning rows in key order, but the ordering can generate hot spots
  59. # for sequential insertion workloads.
  60. # - OrderPreservingPartitioner is an obsolete form of BOP, that stores
  61. # - keys in a less-efficient format and only works with keys that are
  62. # UTF8-encoded Strings.
  63. # - CollatingOPP colates according to EN,US rules rather than lexical byte
  64. # ordering. Use this as an example if you need custom collation.
  65. #
  66. # See http://wiki.apache.org/cassandra/Operations for more on
  67. # partitioners and token selection.
  68. partitioner: org.apache.cassandra.dht.RandomPartitioner
  69.  
  70. # directories where Cassandra should store data on disk.
  71. data_file_directories:
  72. - /var/lib/cassandra/data
  73.  
  74. # commit log
  75. commitlog_directory: /var/lib/cassandra/commitlog
  76.  
  77. # saved caches
  78. saved_caches_directory: /var/lib/cassandra/saved_caches
  79.  
  80. # commitlog_sync may be either "periodic" or "batch."
  81. # When in batch mode, Cassandra won't ack writes until the commit log
  82. # has been fsynced to disk. It will wait up to
  83. # commitlog_sync_batch_window_in_ms milliseconds for other writes, before
  84. # performing the sync.
  85. #
  86. # commitlog_sync: batch
  87. # commitlog_sync_batch_window_in_ms: 50
  88. #
  89. # the other option is "periodic" where writes may be acked immediately
  90. # and the CommitLog is simply synced every commitlog_sync_period_in_ms
  91. # milliseconds.
  92. commitlog_sync: periodic
  93. commitlog_sync_period_in_ms: 10000
  94.  
  95. # any class that implements the SeedProvider interface and has a constructor that takes a Map<String, String> of
  96. # parameters will do.
  97. seed_provider:
  98. # Addresses of hosts that are deemed contact points.
  99. # Cassandra nodes use this list of hosts to find each other and learn
  100. # the topology of the ring. You must change this if you are running
  101. # multiple nodes!
  102. - class_name: org.apache.cassandra.locator.SimpleSeedProvider
  103. parameters:
  104. # seeds is actually a comma-delimited list of addresses.
  105. # Ex: "<ip1>,<ip2>,<ip3>"
  106. - seeds: "ec2-50-19-178-196.compute-1.amazonaws.com"
  107.  
  108. # emergency pressure valve: each time heap usage after a full (CMS)
  109. # garbage collection is above this fraction of the max, Cassandra will
  110. # flush the largest memtables.
  111. #
  112. # Set to 1.0 to disable. Setting this lower than
  113. # CMSInitiatingOccupancyFraction is not likely to be useful.
  114. #
  115. # RELYING ON THIS AS YOUR PRIMARY TUNING MECHANISM WILL WORK POORLY:
  116. # it is most effective under light to moderate load, or read-heavy
  117. # workloads; under truly massive write load, it will often be too
  118. # little, too late.
  119. flush_largest_memtables_at: 0.75
  120.  
  121. # emergency pressure valve #2: the first time heap usage after a full
  122. # (CMS) garbage collection is above this fraction of the max,
  123. # Cassandra will reduce cache maximum _capacity_ to the given fraction
  124. # of the current _size_. Should usually be set substantially above
  125. # flush_largest_memtables_at, since that will have less long-term
  126. # impact on the system.
  127. #
  128. # Set to 1.0 to disable. Setting this lower than
  129. # CMSInitiatingOccupancyFraction is not likely to be useful.
  130. reduce_cache_sizes_at: 0.85
  131. reduce_cache_capacity_to: 0.6
  132.  
  133. # For workloads with more data than can fit in memory, Cassandra's
  134. # bottleneck will be reads that need to fetch data from
  135. # disk. "concurrent_reads" should be set to (16 * number_of_drives) in
  136. # order to allow the operations to enqueue low enough in the stack
  137. # that the OS and drives can reorder them.
  138. #
  139. # On the other hand, since writes are almost never IO bound, the ideal
  140. # number of "concurrent_writes" is dependent on the number of cores in
  141. # your system; (8 * number_of_cores) is a good rule of thumb.
  142. concurrent_reads: 32
  143. concurrent_writes: 32
  144.  
  145. # Total memory to use for memtables. Cassandra will flush the largest
  146. # memtable when this much memory is used. Prefer using this to
  147. # the older, per-ColumnFamily memtable flush thresholds.
  148. # If omitted, Cassandra will set it to 1/3 of the heap.
  149. # If set to 0, only the old flush thresholds are used.
  150. # memtable_total_space_in_mb: 2048
  151.  
  152. # Total space to use for commitlogs.
  153. # If space gets above this value (it will round up to the next nearest
  154. # segment multiple), Cassandra will flush every dirty CF in the oldest
  155. # segment and remove it.
  156. # commitlog_total_space_in_mb: 4096
  157.  
  158. # This sets the amount of memtable flush writer threads. These will
  159. # be blocked by disk io, and each one will hold a memtable in memory
  160. # while blocked. If you have a large heap and many data directories,
  161. # you can increase this value for better flush performance.
  162. # By default this will be set to the amount of data directories defined.
  163. #memtable_flush_writers: 1
  164.  
  165. # the number of full memtables to allow pending flush, that is,
  166. # waiting for a writer thread. At a minimum, this should be set to
  167. # the maximum number of secondary indexes created on a single CF.
  168. memtable_flush_queue_size: 4
  169.  
  170. # Buffer size to use when performing contiguous column slices.
  171. # Increase this to the size of the column slices you typically perform
  172. sliced_buffer_size_in_kb: 64
  173.  
  174. # TCP port, for commands and data
  175. storage_port: 7000
  176.  
  177. # Address to bind to and tell other Cassandra nodes to connect to. You
  178. # _must_ change this if you want multiple nodes to be able to
  179. # communicate!
  180. #
  181. # Leaving it blank leaves it up to InetAddress.getLocalHost(). This
  182. # will always do the Right Thing *if* the node is properly configured
  183. # (hostname, name resolution, etc), and the Right Thing is to use the
  184. # address associated with the hostname (it might not be).
  185. #
  186. # Setting this to 0.0.0.0 is always wrong.
  187. listen_address:
  188.  
  189. # Address to broadcast to other Cassandra nodes
  190. # Leaving this blank will set it to the same value as listen_address
  191. # broadcast_address: 1.2.3.4
  192.  
  193. # The address to bind the Thrift RPC service to -- clients connect
  194. # here. Unlike ListenAddress above, you *can* specify 0.0.0.0 here if
  195. # you want Thrift to listen on all interfaces.
  196. #
  197. # Leaving this blank has the same effect it does for ListenAddress,
  198. # (i.e. it will be based on the configured hostname of the node).
  199. rpc_address: 0.0.0.0
  200. # port for Thrift to listen for clients on
  201. rpc_port: 9160
  202.  
  203. # enable or disable keepalive on rpc connections
  204. rpc_keepalive: true
  205.  
  206. # Cassandra provides you with a variety of options for RPC Server
  207. # sync -> Creates one thread per connection but with a configurable number of
  208. # threads. This can be expensive in memory used for thread stack for
  209. # a large enough number of clients. (Hence, connection pooling is
  210. # very, very strongly recommended.)
  211. #
  212. # async -> Nonblocking server implementation with one thread to serve
  213. # rpc connections. This is not recommended for high throughput use
  214. # cases.
  215. #
  216. # hsha -> half sync and half async implementation with configurable number
  217. # of worker threads (For managing connections). IO Management is
  218. # done by a set of threads currently equal to the number of
  219. # processors in the system. The number of threads in the threadpool
  220. # is configured via rpc_min_threads and rpc_max_threads. (Connection
  221. # pooling is strongly recommended in this case too.)
  222.  
  223. rpc_server_type: sync
  224.  
  225. # Uncomment rpc_min|max|thread to set request pool size.
  226. # You would primarily set max for the sync server to safeguard against
  227. # misbehaved clients; if you do hit the max, Cassandra will block until one
  228. # disconnects before accepting more. The defaults are min of 16 and max
  229. # unlimited.
  230. #
  231. # For the Hsha server, you would set the max so that a fair amount of resources
  232. # are provided to the other working threads on the server.
  233. #
  234. # This configuration is not used for the async server.
  235. #
  236. # rpc_min_threads: 16
  237. # rpc_max_threads: 2048
  238.  
  239. # uncomment to set socket buffer sizes on rpc connections
  240. # rpc_send_buff_size_in_bytes:
  241. # rpc_recv_buff_size_in_bytes:
  242.  
  243. # Frame size for thrift (maximum field length).
  244. # 0 disables TFramedTransport in favor of TSocket. This option
  245. # is deprecated; we strongly recommend using Framed mode.
  246. thrift_framed_transport_size_in_mb: 15
  247.  
  248. # The max length of a thrift message, including all fields and
  249. # internal thrift overhead.
  250. thrift_max_message_length_in_mb: 16
  251.  
  252. # Set to true to have Cassandra create a hard link to each sstable
  253. # flushed or streamed locally in a backups/ subdirectory of the
  254. # Keyspace data. Removing these links is the operator's
  255. # responsibility.
  256. incremental_backups: false
  257.  
  258. # Whether or not to take a snapshot before each compaction. Be
  259. # careful using this option, since Cassandra won't clean up the
  260. # snapshots for you. Mostly useful if you're paranoid when there
  261. # is a data format change.
  262. snapshot_before_compaction: false
  263.  
  264. # change this to increase the compaction thread's priority. In java, 1 is the
  265. # lowest priority and that is our default.
  266. # compaction_thread_priority: 1
  267.  
  268. # Add column indexes to a row after its contents reach this size.
  269. # Increase if your column values are large, or if you have a very large
  270. # number of columns. The competing causes are, Cassandra has to
  271. # deserialize this much of the row to read a single column, so you want
  272. # it to be small - at least if you do many partial-row reads - but all
  273. # the index data is read for each access, so you don't want to generate
  274. # that wastefully either.
  275. column_index_size_in_kb: 64
  276.  
  277. # Size limit for rows being compacted in memory. Larger rows will spill
  278. # over to disk and use a slower two-pass compaction process. A message
  279. # will be logged specifying the row key.
  280. in_memory_compaction_limit_in_mb: 64
  281.  
  282. # Number of simultaneous compactions to allow, NOT including
  283. # validation "compactions" for anti-entropy repair. This defaults to
  284. # the number of cores. This can help preserve read performance in a
  285. # mixed read/write workload, by mitigating the tendency of small
  286. # sstables to accumulate during a single long running compactions. The
  287. # default is usually fine and if you experience problems with
  288. # compaction running too slowly or too fast, you should look at
  289. # compaction_throughput_mb_per_sec first.
  290. #
  291. # Uncomment to make compaction mono-threaded.
  292. #concurrent_compactors: 1
  293.  
  294. # Throttles compaction to the given total throughput across the entire
  295. # system. The faster you insert data, the faster you need to compact in
  296. # order to keep the sstable count down, but in general, setting this to
  297. # 16 to 32 times the rate you are inserting data is more than sufficient.
  298. # Setting this to 0 disables throttling. Note that this account for all types
  299. # of compaction, including validation compaction.
  300. compaction_throughput_mb_per_sec: 16
  301.  
  302. # Track cached row keys during compaction, and re-cache their new
  303. # positions in the compacted sstable. Disable if you use really large
  304. # key caches.
  305. compaction_preheat_key_cache: true
  306.  
  307. # Time to wait for a reply from other nodes before failing the command
  308. rpc_timeout_in_ms: 10000
  309.  
  310. # phi value that must be reached for a host to be marked down.
  311. # most users should never need to adjust this.
  312. # phi_convict_threshold: 8
  313.  
  314. # endpoint_snitch -- Set this to a class that implements
  315. # IEndpointSnitch, which will let Cassandra know enough
  316. # about your network topology to route requests efficiently.
  317. # Out of the box, Cassandra provides
  318. # - org.apache.cassandra.locator.SimpleSnitch:
  319. # Treats Strategy order as proximity. This improves cache locality
  320. # when disabling read repair, which can further improve throughput.
  321. # - org.apache.cassandra.locator.RackInferringSnitch:
  322. # Proximity is determined by rack and data center, which are
  323. # assumed to correspond to the 3rd and 2nd octet of each node's
  324. # IP address, respectively
  325. # org.apache.cassandra.locator.PropertyFileSnitch:
  326. # - Proximity is determined by rack and data center, which are
  327. # explicitly configured in cassandra-topology.properties.
  328. #endpoint_snitch: org.apache.cassandra.locator.SimpleSnitch
  329. endpoint_snitch: org.apache.cassandra.locator.Ec2MultiRegionSnitch
  330. #endpoint_snitch: org.apache.cassandra.locator.Ec2Snitch
  331.  
  332. # dynamic_snitch -- This boolean controls whether the above snitch is
  333. # wrapped with a dynamic snitch, which will monitor read latencies
  334. # and avoid reading from hosts that have slowed (due to compaction,
  335. # for instance)
  336. dynamic_snitch: true
  337. # controls how often to perform the more expensive part of host score
  338. # calculation
  339. dynamic_snitch_update_interval_in_ms: 100
  340. # controls how often to reset all host scores, allowing a bad host to
  341. # possibly recover
  342. dynamic_snitch_reset_interval_in_ms: 600000
  343. # if set greater than zero and read_repair_chance is < 1.0, this will allow
  344. # 'pinning' of replicas to hosts in order to increase cache capacity.
  345. # The badness threshold will control how much worse the pinned host has to be
  346. # before the dynamic snitch will prefer other replicas over it. This is
  347. # expressed as a double which represents a percentage. Thus, a value of
  348. # 0.2 means Cassandra would continue to prefer the static snitch values
  349. # until the pinned host was 20% worse than the fastest.
  350. dynamic_snitch_badness_threshold: 0.0
  351.  
  352. # request_scheduler -- Set this to a class that implements
  353. # RequestScheduler, which will schedule incoming client requests
  354. # according to the specific policy. This is useful for multi-tenancy
  355. # with a single Cassandra cluster.
  356. # NOTE: This is specifically for requests from the client and does
  357. # not affect inter node communication.
  358. # org.apache.cassandra.scheduler.NoScheduler - No scheduling takes place
  359. # org.apache.cassandra.scheduler.RoundRobinScheduler - Round robin of
  360. # client requests to a node with a separate queue for each
  361. # request_scheduler_id. The scheduler is further customized by
  362. # request_scheduler_options as described below.
  363. request_scheduler: org.apache.cassandra.scheduler.NoScheduler
  364.  
  365. # Scheduler Options vary based on the type of scheduler
  366. # NoScheduler - Has no options
  367. # RoundRobin
  368. # - throttle_limit -- The throttle_limit is the number of in-flight
  369. # requests per client. Requests beyond
  370. # that limit are queued up until
  371. # running requests can complete.
  372. # The value of 80 here is twice the number of
  373. # concurrent_reads + concurrent_writes.
  374. # - default_weight -- default_weight is optional and allows for
  375. # overriding the default which is 1.
  376. # - weights -- Weights are optional and will default to 1 or the
  377. # overridden default_weight. The weight translates into how
  378. # many requests are handled during each turn of the
  379. # RoundRobin, based on the scheduler id.
  380. #
  381. # request_scheduler_options:
  382. # throttle_limit: 80
  383. # default_weight: 5
  384. # weights:
  385. # Keyspace1: 1
  386. # Keyspace2: 5
  387.  
  388. # request_scheduler_id -- An identifer based on which to perform
  389. # the request scheduling. Currently the only valid option is keyspace.
  390. # request_scheduler_id: keyspace
  391.  
  392. # The Index Interval determines how large the sampling of row keys
  393. # is for a given SSTable. The larger the sampling, the more effective
  394. # the index is at the cost of space.
  395. index_interval: 128
  396.  
  397. # Enable or disable inter-node encryption
  398. # Default settings are TLS v1, RSA 1024-bit keys (it is imperative that
  399. # users generate their own keys) TLS_RSA_WITH_AES_128_CBC_SHA as the cipher
  400. # suite for authentication, key exchange and encryption of the actual data transfers.
  401. # NOTE: No custom encryption options are enabled at the moment
  402. # The available internode options are : all, none
  403. #
  404. # The passwords used in these options must match the passwords used when generating
  405. # the keystore and truststore. For instructions on generating these files, see:
  406. # http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore
  407. encryption_options:
  408. internode_encryption: none
  409. keystore: conf/.keystore
  410. keystore_password: cassandra
  411. truststore: conf/.truststore
  412. truststore_password: cassandra
Advertisement
Add Comment
Please, Sign In to add comment