Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

20140704 cassandra introduction

1,078 views

Published on

20140704 cassandra introduction
@ Xtone, Ltd. Pizza-kai

Published in: Technology
  • Be the first to comment

  • Be the first to like this

20140704 cassandra introduction

  1. 1. CassandraึṌ䛾ึṌ 2014-­‐07-­‐04 Xtone 䝢䝄఍
  2. 2. Apache Cassandra • Google BigTable䜢DHTୖ䛻ᐇ⿦䛧䛯ศᩓ䝕䞊 䝍䝇䝖䜰 • ከḟඖKVS䛾䜘䛖䛻ぢ䛘䜛 – KeySpace (䝕䞊䝍䝧䞊䝇䛻┦ᙜ) – ColumnFamily (䝔䞊䝤䝹䛻┦ᙜ) – Row (⾜䛻┦ᙜ; ศᩓඛ䝜䞊䝗䜢Ỵᐃ) – Column – (Timestamp)
  3. 3. ≉ᛶ • Row Key䛻䜘䛳䛶ศᩓ – ୍䛴䛾Row䛻䛯䛟䛥䜣ワ䜑䜛䛸ศᩓ䛷䛝䛺䛔 – Kmestamp䛷᭱᪂䝕䞊䝍䜢⥔ᣢ • ෕㛗ᛶ䛾ᗘྜ䛔䜢㑅ᢥྍ⬟ – ONE: 1ྎ䛻᭩䛡䛯䜙/ㄞ䜑䛯䜙OK – QUORUM: 䝺䝥䝸䜹ᩘ䛾㐣༙ᩘ䛷OK – ALL: 䝺䝥䝸䜹ᩘ䛾඲䛶䛷䜘䛖䜔䛟OK
  4. 4. ෕㛗ᛶ䞉つᶍᛶ • ᣦᐃ䛧䛯䝺䝥䝸䜹ᩘศ䛰䛡䛾䝜䞊䝗䛻」〇 • ୍᫬ⓗ䛺ᨾ㞀䛿⫪௦䜟䜚䠄⤖ᯝᩚྜᛶ䠅 • Row䛜ቑ䛘䜛ศ䛻䛿↓㝈䛻䝇䜿䞊䝹ྍ⬟ 䈜 ᚋ㏙ • 䝕䞊䝍䝉䞁䝍䞊䜔䝷䝑䜽䛻ᇶ䛵䛔䛶ศᩓྍ⬟
  5. 5. 䝸䞁䜾 • 䠄㠃ಽ䛺䛾䛷䝩䝽䜲䝖䝪䞊䝗䛷ㄝ᫂䠅
  6. 6. 㐠⏝ • ቯ䜜䛯䜙ᢤ䛡䜀Ⰻ䛔 – QUORUM䛷䝺䝥䝸䜹ᩘ3䛺䜙䜀䚸1ྎቯ䜜䛯᫬Ⅼ䛷 ෌ྠᮇ䠄repair䠅䛩䜜䜀䝃䞊䝡䝇䛿↓೵Ṇ • 㐃⥆䛧䛶2ྎቯ䜜䜛䛸䜎䛪䛔 – QUORUM䛷䝺䝥䝸䜹3ྎ䛾2ྎ䛜Ṛ䛼䛸ከᩘỴ䛜 ྲྀ䜜䛺䛔䚹
  7. 7. ᐃᮇrepair • 䝕䞊䝍๐㝖 – 䝣䝷䜾❧䛶䜛䛰䛡 – 䝣䝷䜾䛜᫬㛫䛷ᾘ䛘䜛䠄10᪥䠅 – ẖ㐌䝨䞊䝇䛷䝕䞊䝍ྠᮇ䛜ᚲせ
  8. 8. Virtual Nodes • 1ྎ䛷N(256)ྎศ䛾௬᝿䝜䞊䝗 – ≉ᐃ䛾䝜䞊䝗䜈䛾೫䜚䜢㜵䛠 – N䜢ቑῶ䛥䛫䜛䛣䛸䛷ฎ⌮䛾㔜䜏௜䛡䛜ྍ⬟ • 䛂㐃⥆䛧䛯2ྎ䛾䝜䞊䝗䛾ᨾ㞀䠙Ṛ䛃 – ௵ព䛾2ྎ䛜㐃⥆䝜䞊䝗䛷䛒䜛ྍ⬟ᛶ䛜㧗䛔 – ᨾ㞀⋡䛭䛾䜒䛾䛿ୖ᪼
  9. 9. snapshot • 䝕䜱䝇䜽ୖ䛾sstables䜢」〇䛧䛯䛰䛡 – ฼⏝㔞ศ䛭䛾䜎䜎㣗䛖 – 䝕䜱䝇䜽฼⏝⋡䛻ὀព • snapshot඲㒊ᣢ䛳䛶⾜䛳䛶㣗䜟䛫䛶repair
  10. 10. ᨭ᥼䝒䞊䝹 • Jenkins䛷ᨭ᥼䝒䞊䝹䜢䝍䝇䜽໬ – ᐃᮇrepair – ᐃᮇsnapshot – 䝜䞊䝗㞀ᐖ᫬䛾removenode
  11. 11. ┘ど • OpsCenter – DataStax♫䛾⟶⌮䝒䞊䝹 • JMX – Zabbix䜔Munin䛸䛛䛷┤᥋┘どྍ⬟ – Jolokia䛷JSON䛷ฟ䛧䛶ྛ✀䝒䞊䝹 • ᥋⥆┘ど – Protocol䛾✀㢮䛜䛒䜛䠄䝫䞊䝖䜒㐪䛖䟿䠅 – Thri^ᤞ䛶䛶௒ᚋ䛿NaKve transport – h_ps://github.com/nekoruri/cql-­‐check
  12. 12. 䜎䛸䜑 • 䛣䜟䛟䛺䛔䜘䠄䛯䜆䜣䠅

×