1. 程式人生 > >ES 和influxdb那些事

ES 和influxdb那些事

簡介

最近一直在使用ES,之前也使用過influxdb。使用過程中兩者在某些功能上有些類似。所以這裡對兩者一些區別和功能進行整理。已更好了解這兩者工具。

ES和influxdb介紹

  1. ES
    • 是一個基於lucence的實時搜尋伺服器,本身是一個應用。
    • 沒有UI管理介面。
    • 支援restful格式http介面來操作和展示介面,資料展示依靠Kibana。
  2. influxdb
    • 開源分散式時序、事件和指標資料庫。使用 Go 語言編寫,無需外部依賴。其設計目標是實現分散式和水平伸縮擴充套件。
    • 自帶管理介面,介面自帶簡單的圖表
      image
    • 提供類似sql的查詢語言。
    • 展示圖表可以使用grafana

區別

  • ES支援全文檢索.
  • 主要是針對term(關鍵字)。在時序資料的某些和處理上influxdb好於ES。
  • 對於數字的一些監控,建議使用influxdb。而對於日誌,文字可以使用ES。
  • 兩者都可以使用grafana做為展示。
  • es vs influxdb效能測試 : the rates of data ingestion, on-disk data compression, and query performance. InfluxDB outperformed Elasticsearch in all three tests with 8x greater write throughput, while using 4x less disk space when compared against Elastic’s time series optimized configuration, and delivering 3.5x to 7.5x faster response times for tested queries.
    • 寫效能
    • image
    • 查詢效能
    • image

在這裡順便提一下Grafana和Kibana兩個監控平臺的資料展示介面
- Kibana是和ES配套的資料展示工具。只支援ES。同時也有豐富的圖表功能。因為與ES配套,所以Kibana更適合去分析日誌。
- Grafana是一個開源的支援包括ES和influxdb多種資料來源,有使用者許可權驗證功能。Grafana更適合展示資料。

influxdb實際案例

參考