四 ElasticSearch與OpenSearch比較
? ? ? ?OpenSearch項目分為 OpenSearch(源自 Elasticsearch 7.10.2)與 OpenSearch Dashboards(源自 Kibana 7.10.2)兩部分。此外,OpenSearch 項目也將成為之前發布的 Elasticsearch 發行版(即 Open Distro for Elasticsearch )的“新家”,在這里為廣大用戶提供企業級的安全、警報、機器學習、SQL、索引狀態管理等多項功能。
OpenSearch 項目中的所有軟件都是遵循 Apache 2.0許可證(ALv2)所發布。
OpenSearch和ElasticSearch的產品線比較,對比我們可以參考如下:
OpenSearch提供了很多開源ES中不可用的功能
Features | Description |
Advanced Security | Offers encryption, authentication, authorization, and auditing features. They include integrations with Active Directory, LDAP, SAML, Kerberos, JSON web tokens, and more. OpenSearch also provides fine-grained, role-based access control to indices, documents, and fields. |
SQL Query Syntax | Provides the familiar SQL query syntax. Use aggregations, group by, and where clauses to investigate your data. Read data as JSON documents or CSV tables so you have the flexibility to use the format that works best for you. |
Reporting | Schedule, export, and share reports from dashboards, saved searches, alerts, and visualizations. |
Anomaly Detection | Use machine learning anomaly detection based on the Random Cut Forest (RCF) algorithm to automatically detect anomalies as your data is ingested. Combine with alerting to monitor data in near real time and send alert notifications automatically. |
Index Management | Define custom policies to automate routine index management tasks, such as rollover and delete, apply them to indices and index patterns, and transforms. |
Performance Analyzer and RCA Framework | Query numerous cluster performance metrics and aggregations. Use PerfTop, the command line interface (CLI) to quickly display and analyze those metrics. Use the root cause analysis (RCA) framework to investigate performance and reliability issues in clusters. |
Asynchronous Search | Run complex queries without worrying about the query timing out with Asynchronous Search queries running in the background. Track query progress and retrieve partial results as they become available. |
Trace Analytics | Ingest and visualize OpenTelemetry data for distributed applications. Visualize the flow of events between these applications to identify performance problems. |
Alerting | Automatically monitor data and send alert notifications to stakeholders. With an intuitive interface and a powerful API, easily set up, manage, and monitor alerts. Craft highly specific alert conditions using OpenSearch’s full query language and scripting capabilities. |
k-NN search | Using machine learning, run the nearest neighbor search algorithm on billions of documents across thousands of dimensions with the same ease as running any regular OpenSearch query. Use aggregations and filter clauses to further refine similarity search operations. k-NN similarity search powers use cases such as product recommendations, fraud detection, image and video search, related document search, and more. |
Piped Processing Language | Provides a familiar query syntax with a comprehensive set of commands delimited by pipes (\ |
Dashboard Notebooks | Combine dashboards, visualizations, text, and more to provide context and detailed explanations when analyzing data. |
ElasticSearch和OpenSearch組件的對比
從圖上可以看出,原來的Elasticsearch實例,就是OpenSearch實例。而Kibana在OpenSearch體系里面叫做OpenSearch Dashboards。原來為ES開發的插件OpenDistro完全變成了OpenSearch的插件,來實現我們剛才說的那些功能,且完全免費。
以X-Pack為例,在OpenSearch中叫做OpenSearch-security,以plugin的形式隨著二進制包一起被下載。
容量估算,容量估算的公式基本和ES的估算方式一樣,且各個功能節點的預估也和ES一樣
認證集成和ES的x-pack一樣,常見的認證方式都可以支持。
? ? ? OpenSearch多種中英文分詞器、行業分詞器,均來自阿里NLP的技術成果,效果明顯好于開源分詞器。內置已成熟的多種高級算法功能,用戶在控制臺通過簡單的交互即可使用,無需額外自主研發,搜索效果即可一鍵提升。人工干預功能即干預即生效。
? ? ? Elasticsearch開源產品更加靈活,對于有開發能力的客戶來說,使用Elasticsearch可以自研更適合自身業務的插件和算法使用,并且迭代節奏完全可以自行把控。數據接入方式基本沒有局限。所以不管業務數據存放在哪里都可以較方便的接入Elasticsearch。品牌軟實力,全世界聞名的開源搜索引擎。沒有數據敏感性的困擾。
? ? ? OpenSearch:數據接入方式相比Elasticsearch來說較局限,目前僅支持云上的rds、odps或用戶通過API/SDK的方式推送。基本上所有的算法功能都是黑盒的,用戶無法根據業務自己迭代opensearch的算法功能,靈活性不夠;服務部署目前暫時較少
? ? ? Elasticsearch如果對搜索效果有較高要求,Elasticsearch的開發難度相對較高,比如OpenSearch默認支持兩輪排序,用戶在控制臺上填寫每輪排序表達式即可,但是Elasticsearch的兩輪排序的實現對于索引配置的合理性有要求。自定義分詞文件每次上傳都需要重啟服務,方便性較弱。需要復雜繁瑣的運維。