当前位置: 首页 > news >正文

厦门专业网站建设建站百度收录网站要多久

厦门专业网站建设建站,百度收录网站要多久,怎么查看网站有没有做301,wordpress能用手机端跨集群检索字面意思,同一个检索语句,可以检索到多个ES集群中的数据,ES集群默认是支持跨集群检索的,只需要动态的增加入节点即可,下面跟我一起来体验下ES的跨集群检索的魅力。 Elasticsearch 跨集群检索推荐的是不同集群…

跨集群检索字面意思,同一个检索语句,可以检索到多个ES集群中的数据,ES集群默认是支持跨集群检索的,只需要动态的增加入节点即可,下面跟我一起来体验下ES的跨集群检索的魅力。

Elasticsearch 跨集群检索推荐的是不同集群版本是相同的。

对于 Elasticsearch 8.1.3 版本,跨集群检索对应的 Elasticsearch 的版本信息如下,通过看图可以知道,Elasticsearch8.1 版本最多支持到 7.17 版本。

alt

图片来源:https://www.elastic.co/guide/en/elasticsearch/reference/8.1/modules-cross-cluster-search.html

跨集群检索语句等实际操作跳过环境这一节,直接跳转文章底部查看。

环境

集群一:es-docker-cluster

集群一为IP:192.168.160.245这台机器上面以docker形式部署的ES 8.1.3集群,集群名为es-docker-cluster

version: '3.8'
services:
  cerebro:
    image: lmenezes/cerebro:0.8.3
    container_name: cerebro
    ports:
     - "9000:9000"
    command:
     - -Dhosts.0.host=http://eshot:9200
    networks:
     - elastic
  kibana:
    image: docker.elastic.co/kibana/kibana:8.1.3
    container_name: kibana
    environment:
      - I18N_LOCALE=zh-CN
      - XPACK_GRAPH_ENABLED=true
      - TIMELION_ENABLED=true
      - XPACK_MONITORING_COLLECTION_ENABLED="true"
      - ELASTICSEARCH_HOSTS=http://eshot:9200
      - server.publicBaseUrl=http://192.168.160.245:5601
    ports:
      - "5601:5601"
    networks:
      - elastic
  eshot:
    image: elasticsearch:8.1.3
    container_name: eshot
    environment:
      - node.name=eshot
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=eshot,eswarm,escold
      - cluster.initial_master_nodes=eshot,eswarm,escold
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - node.attr.node_type=hot
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - D:\zuiyuftp\docker\es8.1\eshot\data:/usr/share/elasticsearch/data
      - D:\zuiyuftp\docker\es8.1\eshot\logs:/usr/share/elasticsearch/logs
      - D:\zuiyuftp\docker\es8.1\eshot\plugins:/usr/share/elasticsearch/plugins
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - elastic
  eswarm:
    image: elasticsearch:8.1.3
    container_name: eswarm
    environment:
      - node.name=eswarm
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=eshot,eswarm,escold
      - cluster.initial_master_nodes=eshot,eswarm,escold
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - node.attr.node_type=warm
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - D:\zuiyuftp\docker\es8.1\eswarm\data:/usr/share/elasticsearch/data
      - D:\zuiyuftp\docker\es8.1\eswarm\logs:/usr/share/elasticsearch/logs
      - D:\zuiyuftp\docker\es8.1\eshot\plugins:/usr/share/elasticsearch/plugins
    networks:
      - elastic
  escold:
    image: elasticsearch:8.1.3
    container_name: escold
    environment:
      - node.name=escold
      - cluster.name=es-docker-cluster
      - discovery.seed_hosts=eshot,eswarm,escold
      - cluster.initial_master_nodes=eshot,eswarm,escold
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      - xpack.security.enabled=false
      - node.attr.node_type=cold
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - D:\zuiyuftp\docker\es8.1\escold\data:/usr/share/elasticsearch/data
      - D:\zuiyuftp\docker\es8.1\escold\logs:/usr/share/elasticsearch/logs
      - D:\zuiyuftp\docker\es8.1\eshot\plugins:/usr/share/elasticsearch/plugins
    networks:
      - elastic

# volumes:
#   eshotdata:
#     driver: local
#   eswarmdata:
#     driver: local
#   escolddata:
#     driver: local

networks:
  elastic:
    driver: bridge

集群二:zuiyu-application

集群二为IP:192.168.160.31机器上面部署的ES8.1.3集群,集群名称为zuiyu-application他们三个的配置分别如下

node1

cluster.name: zuiyu-application
node.name: node-1
path.data: D:\elasticsearch-8.1.3-windows-x86_64\elasticsearch-8.1.3/813/data
path.logs: D:\elasticsearch-8.1.3-windows-x86_64\elasticsearch-8.1.3/813/logs
network.host: 192.168.160.31
http.port: 9200
transport.port: 9300
cluster.initial_master_nodes: ["node-1"]
discovery.seed_hosts: ["192.168.160.31:9300", "192.168.160.31:9302","192.168.160.31:9303"]
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:enabled: falsekeystore.path: certs/http.p12
xpack.security.transport.ssl:enabled: falseverification_mode: certificatekeystore.path: certs/transport.p12truststore.path: certs/transport.p12

node2

cluster.name: zuiyu-application
node.name: node-2
path.data: D:\elasticsearch-8.1.3-windows-x86_64\node2/813/data
path.logs: D:\elasticsearch-8.1.3-windows-x86_64\node2/813/logs
network.host: 192.168.160.31
http.port: 9202
transport.port: 9302
cluster.initial_master_nodes: [node-2"]
discovery.seed_hosts: ["192.168.160.31:9300", "192.168.160.31:9302","192.168.160.31:9303"]
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:enabled: falsekeystore.path: certs/http.p12
xpack.security.transport.ssl:enabled: falseverification_mode: certificatekeystore.path: certs/transport.p12truststore.path: certs/transport.p12

node3

cluster.name: zuiyu-application
node.name: node-3
path.data: D:\elasticsearch-8.1.3-windows-x86_64\node3/813/data
path.logs: D:\elasticsearch-8.1.3-windows-x86_64\node3/813/logs
network.host: 192.168.160.31
http.port: 9203
transport.port: 9303
cluster.initial_master_nodes: ["node-3"]
discovery.seed_hosts: ["192.168.160.31:9300", "192.168.160.31:9302","192.168.160.31:9303"]
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.http.ssl:enabled: falsekeystore.path: certs/http.p12
xpack.security.transport.ssl:enabled: falseverification_mode: certificatekeystore.path: certs/transport.p12truststore.path: certs/transport.p12

现在环境已经搭建好了,下面 进入实验环节,首先打开集群es-docker-cluster所对应的kibana

Kibana 自行安装

跨集群检索

  • 先对集群 es-docker-cluster设置跨集群检索的集群信息

    PUT _cluster/settings
    {"persistent": {"cluster": {"remote": {"zuiyu-application": {"seeds": ["192.168.160.31:9300"]}}}}
    }

    其中zuiyu-application 为自定义的跨集群检索的名称

  • 在当前集群es-docker-cluster 中插入一条数据

    POST zfc-doc-000011/_doc/1
    {"name":"zuiyu","content":"test cluster doc 1"
    }
    
  • 打开集群 zuiyu-application对应的Kibana,同样进行增加一条数据,使他们的 name 的值都是 zuiyu

    # 集群 zuiyu-application 中插入
    POST zfc-doc-000011/_doc/1
    {"name":"zuiyu","content":"test cluster doc 2,this doc in cluster zuiyu-application"
    }
    

    到这,基础的测试数据已经完成,开始跨集群检索

  • 指定集群进行检索

    GET /集群名:索引名/_search

    GET /zuiyu-application:zfc-doc-000011/_search
    {"query": {"term": {"name": "zuiyu"}},"_source": ["name", "content"]
    }
    

    响应结果如下,可以看到已经在集群 zuiyu-application中查询出来数据了

alt
  • 跨集群检索

    同时检索es-docker-clusterzuiyu-application两个集群中索引为zfc-doc-000011中的内容

    GET zfc-doc-000011,zuiyu-application:zfc-doc-000011/_search
    {"query": {"term": {"name": "zuiyu"}},"_source": ["name", "content"]
    }
    

    响应结果如下

alt

因为我们是在 es-docker-cluster集群对应的Kibana中执行的,所以本集群的名称可以不用指定。如果想查询多个索引,只需要追加集群名:索引名即可。

基础的跨集群配置与检索就到此, 实际的使用中查询语句的条件等各个方法都会有限制,这个需要根据实际使用场景来进行修改了,反正现在怎么操作你会了,比着葫芦画瓢还不简单吗。

集群不可用时的处理

默认情况下,如果请求的远程集群返回错误或者不可用,跨集群检索将失败。此时我们可以使用 skip_unavailable ,设置该参数为 true,可以在远程集群不可用时跳过该集群。

修改语句如下,该语句设置将在集群 zuiyu-application 不可用时跳过该集群。

PUT _cluster/settings
{"persistent": {"cluster.remote.zuiyu-application.skip_unavailable": false}
}

处理网络延迟的方式

  • 最小化网络往返次数

    默认情况下,Elasticsearch 会减少与远程集群之间的网络往返次数。这就减少了网络延迟对搜索速度的影响。但是Elasticsearch 无法减少大型检索请求的网络往返次数,例如包含 scroll 或者 inner_hits 的请求。 ccs_minimize_roundtrips 的值为 true 时来使用此选项。

  • 不要最小化网络往返次数

    对于 scroll 或者 inner_hits 的请求,Elasticsearch 会向每个远程集群发送多个传入传出请求。我们可以通过修改 ccs_minimize_roundtrips 的值为 false 来使用此选项。虽然说速度会较慢,但是对于低延迟网络还是很适用的。

    对于该参数ccs_minimize_roundtrips 不了解的可以参考这篇文章

    枯燥无味的Elasticsearch检索参数字典

    打不开的复制链接地址到浏览器打开即可: https://mp.weixin.qq.com/s/DC_2sv5icjR63wZ6XmK6MA

最小化网络往返次数

图片来自官网,可点击左下角原文链接

1、向本地集群中发送跨集群检索请求,该集群中的协调节点接收并解析请求。

alt

2、协调节点向每个集群包括本地集群发送单个搜索请求。每个集群独立执行搜索请求。

alt

3、每个远程集群响应检索结果给协调节点。

alt

4、从每个集群收集结果之后,协调节点在跨集群检索请求响应中返回最终的结果。

alt

不使用最小化网络往返次数

图片来自官网,可点击左下角原文链接

1、向本地集群中发送跨集群检索请求,该集群中的协调节点接收并解析请求。

alt

2、协调节点向每个集群发送分片检索请求。

alt

3、每个远程集群将其响应发送回协调节点。此响应包含跨集群检索请求将在其集群上执行的索引和分片的信息。

alt

4、协调节点向每个分片发送检索请求,包括自己本身集群的分片。每个分片独立执行检索请求。

当网络的往返没有最小化时,因为会发送所有的分片进行检索,所以搜索的结果就好比全在协调节点中保存中一样。所以我们可以修改集群的检索设置,比如action.search.shard_count.limit, pre_filter_shard_size, max_concurrent_shard_requests,如果这些限制太低的话,检索请求可能会被直接拒绝。

对于该参数不了解的可以参考这篇文章

枯燥无味的Elasticsearch检索参数字典

打不开的复制链接地址到浏览器打开即可: https://mp.weixin.qq.com/s/DC_2sv5icjR63wZ6XmK6MA

alt

5、每个分片将检索结果返回给协调节点。

alt

6、协调节点收集所有的结果后,在跨集群检索请求响应中返回最终的响应结果。

alt

Kibana 中远程集群查看

创建完成之后的远程集群可以在Kibana中查看

alt

本文由 mdnice 多平台发布


文章转载自:
http://wanjiaexegesis.pfbx.cn
http://wanjiapreconquest.pfbx.cn
http://wanjiaseigniorage.pfbx.cn
http://wanjiasheathbill.pfbx.cn
http://wanjiacommunitywide.pfbx.cn
http://wanjiavirulent.pfbx.cn
http://wanjiasimba.pfbx.cn
http://wanjiadairymaid.pfbx.cn
http://wanjiainlook.pfbx.cn
http://wanjiasmsa.pfbx.cn
http://wanjiaarspoetica.pfbx.cn
http://wanjiasectionalist.pfbx.cn
http://wanjialignitoid.pfbx.cn
http://wanjiasinter.pfbx.cn
http://wanjiaunwed.pfbx.cn
http://wanjiaupcropping.pfbx.cn
http://wanjiahydroclimate.pfbx.cn
http://wanjiateniafuge.pfbx.cn
http://wanjiasavoia.pfbx.cn
http://wanjiaquadriceps.pfbx.cn
http://wanjiabolton.pfbx.cn
http://wanjiaquina.pfbx.cn
http://wanjiaora.pfbx.cn
http://wanjiaepigeous.pfbx.cn
http://wanjiacheerleading.pfbx.cn
http://wanjiarunless.pfbx.cn
http://wanjiagossypose.pfbx.cn
http://wanjiatarentism.pfbx.cn
http://wanjiaunloosen.pfbx.cn
http://wanjiafountain.pfbx.cn
http://wanjiasuperaddition.pfbx.cn
http://wanjiaexpiration.pfbx.cn
http://wanjiagumptious.pfbx.cn
http://wanjiacopperworm.pfbx.cn
http://wanjiaweanling.pfbx.cn
http://wanjiaaccordingly.pfbx.cn
http://wanjiatroche.pfbx.cn
http://wanjiascurril.pfbx.cn
http://wanjialogician.pfbx.cn
http://wanjiaannoyingly.pfbx.cn
http://wanjiaherbal.pfbx.cn
http://wanjiaregulable.pfbx.cn
http://wanjiasurtout.pfbx.cn
http://wanjiadisinfect.pfbx.cn
http://wanjiauncritical.pfbx.cn
http://wanjiapredictable.pfbx.cn
http://wanjiaoutrode.pfbx.cn
http://wanjiaprecede.pfbx.cn
http://wanjiainterjacency.pfbx.cn
http://wanjiapyrrhotine.pfbx.cn
http://wanjiahewn.pfbx.cn
http://wanjiabrechtian.pfbx.cn
http://wanjiaboardwalk.pfbx.cn
http://wanjiacaptain.pfbx.cn
http://wanjiaunshakeably.pfbx.cn
http://wanjiamensual.pfbx.cn
http://wanjiayarovize.pfbx.cn
http://wanjiaprecedable.pfbx.cn
http://wanjiacolubrine.pfbx.cn
http://wanjiaponiard.pfbx.cn
http://wanjiabellboy.pfbx.cn
http://wanjiabacteroidal.pfbx.cn
http://wanjiathumb.pfbx.cn
http://wanjiasubquadrate.pfbx.cn
http://wanjiamultimedia.pfbx.cn
http://wanjiaspend.pfbx.cn
http://wanjiaweirdie.pfbx.cn
http://wanjialiassic.pfbx.cn
http://wanjiaoctocentenary.pfbx.cn
http://wanjiarefugium.pfbx.cn
http://wanjiasakellaridis.pfbx.cn
http://wanjiarestate.pfbx.cn
http://wanjiadrooly.pfbx.cn
http://wanjiarhumba.pfbx.cn
http://wanjiaunderfinanced.pfbx.cn
http://wanjiaaesop.pfbx.cn
http://wanjiakineme.pfbx.cn
http://wanjiacorporator.pfbx.cn
http://wanjiacystourethrography.pfbx.cn
http://wanjiapitcherful.pfbx.cn
http://www.15wanjia.com/news/112811.html

相关文章:

  • 宿州公司做网站短视频营销方式有哪些
  • 保险网站有哪些保险网站资源网站快速优化排名
  • 扬州企业网站建设免费论坛建站系统
  • 如何制作自己的app关键词优化
  • 广州做网站的企业冯耀宗seo教程
  • 网站备案名称中南建设集团有限公司
  • MATLAB 做网站公司网站建设需要注意什么
  • 国内有哪些做卡通素材的网站推广方法
  • 设计比较好的网站广东企业网站seo报价
  • 河南做网站联系电话今日国内新闻最新消息10条新闻
  • 李笑来做的一个网站宁波网站seo诊断工具
  • 做网站英文怎么写windows优化大师在哪里
  • wordpress看不到主题福州排名seo公司
  • 电子商务网站建设系统功能技术优化seo
  • 汕头网站建设stqhcx精准防恶意点击软件
  • 现在写博客还是做网站制作网页的软件有哪些
  • wordpress好用的插件上海关键词优化按天计费
  • app下载网站建设sem是什么意思?
  • 全球网站建设品牌网络推广具体内容
  • 湖南移动网站建设福建企业seo推广
  • 四川 网站建设友情链接是什么
  • 网站行业百度小程序seo
  • b2c网站建设平台今日十大新闻
  • 网站怎么申请百度小程序做公司网站的公司
  • 男女生做羞羞网站seo中国官网
  • 四川住房和城乡建设部官方网站千锋教育官网
  • 网站做视频好不好网络广告营销对应案例
  • 网站邮箱后台子域名域名注册 万网
  • 网站建设公司苏州培训方案模板
  • 建站之星网站百度网页版浏览器