官术网_书友最值得收藏!

Communicating with ElasticSearch

You can communicate with your ElasticSearch server with several protocols. In this recipe we will look at some main protocols.

Getting ready

You need a working ElasticSearch cluster.

How it works…

ElasticSearch is designed to be used as a RESTful server, so the main protocol is HTTP usually on port 9200 and above. Thus, it allows using different protocols such as native and thrift ones. Many others are available as extension plugins, but they are seldom used, such as memcached one.

Every protocol has weak and strong points, it's important to choose the correct one depending on the kind of applications you are developing. If you are in doubt, choose the HTTP protocol layer that is the most standard and easy to use one.

Choosing the right protocol depends on several factors, mainly architectural and performance related. This schema factorizes advantages and disadvantages related to them. If you are using it to communicate with Elasticsearch, the official clients switching from a protocol to another one is generally a simple setting in the client initialization. Refer to the following table which shows protocols and their advantages, disadvantages, and types:

主站蜘蛛池模板: 丁青县| 张家港市| 仁化县| 岳池县| 隆尧县| 休宁县| 长岛县| 洪湖市| 广昌县| 密云县| 景东| 洛南县| 茶陵县| 芜湖县| 綦江县| 南昌市| 凤翔县| 华安县| 白城市| 汕尾市| 滦平县| 大冶市| 梓潼县| 土默特左旗| 呼和浩特市| 瑞安市| 嘉峪关市| 东平县| 江油市| 榆中县| 启东市| 吉首市| 房产| 鄂尔多斯市| 大厂| 清新县| 桦川县| 老河口市| 綦江县| 宣汉县| 湟中县|