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

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:

主站蜘蛛池模板: 青浦区| 旅游| 金沙县| 浑源县| 泊头市| 南涧| 吉隆县| 浦县| 广丰县| 石家庄市| 绥江县| 永修县| 桃园县| 浦北县| 通化县| 邹城市| 钟祥市| 酉阳| 福清市| 德令哈市| 富顺县| 海盐县| 英德市| 克东县| 大英县| 普格县| 抚远县| 岳阳市| 九龙县| 门源| 大同县| 遂平县| 鹤山市| 华阴市| 宁陕县| 富平县| 肇源县| 怀化市| 凌云县| 巫溪县| 保亭|