您的位置:首页 > 新闻 > 会展 > python基础教程推荐_上海优化网站关键词_做seo如何赚钱_seo专业术语

python基础教程推荐_上海优化网站关键词_做seo如何赚钱_seo专业术语

2024/10/9 13:09:05 来源:https://blog.csdn.net/babyblue_963/article/details/142721601  浏览:    关键词:python基础教程推荐_上海优化网站关键词_做seo如何赚钱_seo专业术语
python基础教程推荐_上海优化网站关键词_做seo如何赚钱_seo专业术语

对官方文档Networking的阅读笔记。
ES集群中的节点,支持处理两类通信平面

  • 集群内节点之间的通信,官方文档称之为transport layer。
  • 集群外的通信,处理客户端下发的请求,比如数据的CRUD,检索等,官方文档称之为HTTP layer。

对于这两个平面公共的配置,配置参数可以使用network.*
针对transport layer的配置参数,可以使用transport.*
针对HTTP layer的配置参数,可以使用http.*

参数networkhttptransportremote_cluster说明
hostnetwork.hosthttp.hosttransport.hostremote_cluster.host业务的监听地址。
bind_hostnetwork.bind_hosthttp.bind_hosttransport.bind_hostremote_cluster.bind_host默认值与host相同。
publish_hostnetwork.publish_hosthttp.publish_hosttransport.publish_hostremote_cluster.publish_host默认值与host相同。
publish_portN/Ahttp.publish_porttransport.publish_portremote_cluster.publish_port
portN/Ahttp.porttransport.portremote_cluster.port业务的监听端口。
tcp.keep_alivenetwork.tcp.keep_alivehttp.tcp.keep_alivetransport.tcp.keep_aliveremote_cluster.tcp.keep_aliveTCP socket的SO_KEEPALIVE参数,默认值为true。
tcp.keep_idlenetwork.tcp.keep_idlehttp.tcp.keep_idletransport.tcp.keep_idleremote_cluster.tcp.keep_idleTCP socket的TCP_KEEPIDLE参数,默认值为-1。
tcp.keep_intervalnetwork.tcp.keep_intervalhttp.tcp.keep_intervaltransport.tcp.keep_intervalremote_cluster.tcp.keep_intervalTCP socket的TCP_KEEPINTVL参数,默认值为-1。
tcp.keep_countnetwork.tcp.keep_counthttp.tcp.keep_counttransport.tcp.keep_countremote_cluster.tcp.keep_countTCP socket的TCP_KEEPCNT参数,默认值为-1。
tcp.no_delaynetwork.tcp.no_delayhttp.tcp.no_delaytransport.tcp.no_delayremote_cluster.tcp.no_delayTCP socket的TCP_NODELAY参数,默认值为true。详细说明见wiki。
tcp.reuse_addressnetwork.tcp.reuse_addresshttp.tcp.reuse_addresstransport.tcp.reuse_addressremote_cluster.tcp.reuse_addressTCP socket的SO_REUSEADDR参数,Windows平台的默认值为false,其它平台的默认值为true。
tcp.send_buffer_sizenetwork.tcp.send_buffer_sizehttp.tcp.send_buffer_sizetransport.tcp.send_buffer_sizeremote_cluster.tcp.send_buffer_sizeTCP的发送缓冲区的大小,默认值为-1,表示使用系统的默认值。
tcp.receive_buffer_sizenetwork.tcp.receive_buffer_sizehttp.tcp.receive_buffer_sizetransport.tcp.receive_buffer_sizeremote_cluster.tcp.receive_buffer_sizeTCP的接收缓冲区的大小,默认值为-1,表示使用系统的默认值。
compressionN/Ahttp.compressiontransport.compressionN/A压缩。

transport独有的参数:

  • transport.connect_timeout
  • transport.compress
  • transport.compression_scheme
    压缩算法,可选值包括deflate或者lz4,默认值为lz4。
  • transport.ping_schedule
    指示发送业务心跳的周期,默认值为-1,表示不发送业务心跳。

http独有的参数:

  • http.max_content_length
    HTTP请求消息体的长度的最大值,默认值为100MB。

  • http.max_initial_line_length
    HTTP请求中,URL的长度的最大值,默认值为4KB。

  • http.max_header_size
    HTTP请求中,HTTP头部的总长度的最大值,默认值为16KB。

  • http.compression
    使用HTTPS时,默认取值为false,其它情况下取值为true。

  • http.compression_level
    压缩级别,取值范围为[1, 9],默认值为3。

  • http.detailed_errors.enabled
    指定是否允许在HTTP响应消息中暴露详细的错误提示信息,默认值为true。

  • http.pipelining.max_events
    HTTP请求消息队列的长度,默认值为10000。

  • http.max_warning_header_count
    HTTP响应消息中允许包含的提示信息头部的数量,默认值为-1,即不限制。

  • http.max_warning_header_size
    HTTP响应消息中允许包含的提示信息头部的长度,默认值为-1,即不限制。

  • http.client_stats.enabled
    指示是否记录HTTP通信过程中的统计数据,默认值为true。

  • http.client_stats.closed_channels.max_count
    默认值为10000。

  • http.client_stats.closed_channels.max_age
    关闭HTTP通道之后,上传统计数据的时延值,默认值为5m。

http协议CORS特性相关的参数:

  • http.cors.enabled
    是否启用对CORS的支持。
  • http.cors.allow-origin
  • http.cors.max-age
    指示缓存HTTP方法OPTIONS的返回值的时长,即超时时间,默认值为1728000,即20天。
  • http.cors.allow-methods
    HTTP请求中允许使用的方法,默认值包括:
    • OPTIONS
    • HEAD
    • GET
    • POST
    • PUT
    • DELETE
  • http.cors.allow-headers
    允许在HTTP请求消息中使用的头部,默认值包括:
    • X-Requested-With
    • Content-Type
    • Content-Length
    • Authorization
    • Accept
    • User-Agent
    • X-Elastic-Client-Meta
  • http.cors.expose-headers
    指定在HTTP响应消息中返回的头部,默认值为X-elastic-product
  • http.cors.allow-credentials
    决定头部Access-Control-Allow-Credentials是否返回,默认值为false。

remote_cluster_server独有的参数:

  • remote_cluster_server.enabled
    指示是否启用远端集群,默认值为false。

网络通信的线程模型,这部分内容在处理通信相关的故障时非常意义,后续有空时详细阅读。
导出ES进程的栈时,使用关键字transport_worker来检索,可以看到相关的线程的栈。

参考资料

  • Nodes hot threads API

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com