Upgrade to Pro — share decks privately, control downloads, hide ads and more …

回首過去_看_KKBOX_怎麼走搜尋音樂這條路.pdf

Eason Chen
August 11, 2018

 回首過去_看_KKBOX_怎麼走搜尋音樂這條路.pdf

Eason Chen

August 11, 2018
Tweet

More Decks by Eason Chen

Other Decks in Technology

Transcript

  1. 比較 Solr 和 Elasticsearch Solr 3.5 Elasticsearch 1.6 架構 Master-Slave

    Cluster 配置 需要預先在 XML 檔案設定 直接透過 RESTful API 設定 功能 著重於文本搜尋 也支援資料分析 社群 發展成熟 成長中
  2. 優化 Autocomplete 回應時間 Edge ngram Context Suggester 實做方法 周杰倫 ➔

    周、周杰、周杰倫 FST (Finite State Transducer) 實測秒數 15.85 ms 5.8 ms
  3. 資料處理 小寫字母 ASCII 原型詞根 Dash 縮寫符號 表情符號 Token Filter /

    LIbrary lowercase asciifolding porter_stem word_delimiter emojione 案例 Mayday mayday Jóhann Jóhannsson Johann Johannsson apples apple A-Lin a lin alin grinning
  4. 升級效益 • CPU 使用量減少 25% • JVM 最大值從 31G 下降到

    24G • API 平均回應時間從 222ms 下降到 192ms • Index 更新時間縮短 33%
  5. 12:47 Server 5 沒有回應 Cluster Health 亮紅燈 12:48 Server 5

    離開 Cluster Shard 重新分配 Server 4 接手歌單 Shard Server 4 忙碌到沒有回應 12:49 Server 4 離開 Cluster Shard 再度重新分配
  6. • 問題:某些機器 CPU 使用率特別高 • 追蹤:跟索引文件的分配方式有關 • 解決方案 ◦ 人工

    Sharding 介入調整 ◦ 重構歌曲和歌單的 Query 機器負載分布不均