時(shí)間 主題 內(nèi)容 第一部份【1】 Cassandra介紹 SQL and NoSQL CAP理論(CAP theorem) Database or Datastore Cassandra history Cassandra主要結(jié)構(gòu)(Node, Rack, Datacenter, Cluster) 【2】 Cassandra基本概念 種子節(jié)點(diǎn)(Seed nodes) Gossip Protocol 失敗檢測(cè)(Detecing a failed node) 分區(qū)(Partitioner) Ring architecture 數(shù)據(jù)復(fù)制(Data Replication) 集群管理(Snitch) 分段式事件驅(qū)動(dòng)架構(gòu)(SEDA architecture) 討論1: Debate – adding capacity strategy 討論2: Debate – Failover design strategy 第二部份【1】 Cassandra安裝和配置 Cassandra配置文件: Cassandra.yaml, Cassandra-env.sh 防火墻和Cassandra端口(firewall and port) 用戶驗(yàn)證(Authentication) Cassandra客戶端 – CQLSH Debate – Cassandra自動(dòng)化安裝 【2】 Cassandra 建模 表空間(keyspace) 表(Table, column family) 主鍵,分區(qū)鍵(parimey key, parititon key) 一致性(Consistency Level) 寫一致性(Write Consistency Level) 讀一致性(Read Consistency Level) 討論 – R + W > N 建模的基本原則(Modeling guidelines) 反范式建模 數(shù)據(jù)類型(datetype) Counter 寬行(wide row) 查詢條件選擇 二級(jí)索引(Secondary Index) 輕量級(jí)事務(wù)(lightweight transaction) 討論1: 關(guān)系型數(shù)據(jù)在Cassandra里的存儲(chǔ) 討論2: 二級(jí)索引的使用場(chǎng)景 第三部份【1】 Cassandra驅(qū)動(dòng) 連接池配置(Connection Pool) 跨數(shù)據(jù)中心連接(Access Remote DC) 出錯(cuò)重試機(jī)制(Retry Policy) 負(fù)載均衡(Load Balancing) 同步/異步訪問(wèn)(Sync/ASync access) 討論– 如何實(shí)現(xiàn)應(yīng)用層的failover 【2】Cassandra讀寫 數(shù)據(jù)緩存(Memtable) 日志(CommitLog) 數(shù)據(jù)文件命名規(guī)則(data file name rule) 寫邏輯(Write path) 讀邏輯(Read Path) 主鍵緩存(Key Cache) 行緩存(Row cache) 數(shù)據(jù)合并(Compaction) 數(shù)據(jù)壓縮(Compression) 第四部份【1】 Cassandra監(jiān)控 Opscenter的安裝和配置 JMX收集 Metric分析 Java GC【2】 Cassandra管理 數(shù)據(jù)修復(fù)(nodetool repair) 查看統(tǒng)計(jì)信息(nodetool cfstats) CQL跟蹤(CQL tracing) Backup and Recovery(備份和恢復(fù)) Cassandra升級(jí)(Cassandra upgrading) 討論: 數(shù)據(jù)修復(fù)的最佳實(shí)踐