兜里的Elasticsearch的索引在创建的时候没注意index.number_of_shards这个大小,结果导致只有一个主分片,使得整个索引最大长度只有2147483519(原因

所以被迫重建索引
这回,先创建一个number_of_shards为2的索引,具体多少取决于你的业务大小

PUT http://'es节点'/'新索引名字'

{
"mappings": {
    "properties": {
        "username": {
            "type": "keyword",
            "index": "true"
        },
        "password": {
            "type": "keyword",
            "index": "true"
        }
    }
},
"settings": {
    "index.number_of_shards": 2
}
}

然后使用reindex api重新索引
POST http://'es节点'/_reindex?wait_for_completion=false

{
  "source": {
    "index": "旧索引名字"
  },
  "dest": {
    "index": "新索引名字"
  }
}

返回一个task id,可以使用
http://'es节点'/_tasks/'task id'
查看任务情况

某些服务商不允许长时间大量请求dns
unbound别碰了,不行
用coredns进行dns over tls查询,同时负载均衡下
记录下部署记录

Debian 10
coredns latest

wget https://github.com/coredns/coredns/releases/download/v1.8.1/coredns_1.8.1_linux_amd64.tgz
tar zxvf coredns_1.8.1_linux_amd64.tgz
# 这里的路径是因为官方给的service文件里面写的路径是这个,有需求可以自己换
mv coredns /usr/bin/coredns
mkdir /etc/coredns
wget -O /etc/systemd/system/coredns.service https://raw.githubusercontent.com/coredns/deployment/master/debian/coredns.service
systemctl daemon-reload

Corefile内容如下

cat /etc/coredns/Corefile
.:53 {
    bind 127.0.0.1
    forward . 127.0.0.1:5301 127.0.0.1:5302 127.0.0.1:5303
    log
}
.:5301 {
    bind 127.0.0.1
   forward . tls://9.9.9.9 {
       tls_servername dns.quad9.net
   }
}
.:5302 {
    bind 127.0.0.1
    forward . tls://1.1.1.1 tls://1.0.0.1 {
        tls_servername 1dot1dot1dot1.cloudflare-dns.com
    }
}
.:5303 {
    bind 127.0.0.1
    forward . tls://8.8.8.8 tls://8.8.4.4 {
        tls_servername dns.google
    }
}

设置开机启动
同时启动coredns

systemctl enable coredns
systemctl start coredns

或者懒点

systemctl enable coredns --now

最后手动指定nameserver到127.0.0.1即可

经测试,效率不行,容易nxdomain
建议coredns使用dns over tls,如果有routeros,可以使用routeros的dot,先决条件是导入ca,然后设置A记录到dot域名用的ip
下次有空再详细写

经实战,国内站点上阿里的dot比腾讯的dot好用,geodns解析正确

附:
阿里 dns.alidns.com
腾讯 dns.pub/doh.pub