做海报设计的网站,好看的模板网站建设,可信网站认证服务中心,企业宣传手册封面模板一、题目 操作在cluster1#xff08;local#xff09;中操作索引task#xff0c;复制到cluster2#xff08;remote#xff09;中 二、思考
CCR 我们可以对标MySQL 理解为为主从#xff0c;后者备份。主节点负责写入数据#xff0c;从/备节点负责同步时主节点的数据。
…
一、题目 操作在cluster1local中操作索引task复制到cluster2remote中 二、思考
CCR 我们可以对标MySQL 理解为为主从后者备份。主节点负责写入数据从/备节点负责同步时主节点的数据。
注意这个特性是白金版付费功能需要激活 30 天的 License学习试用。 准备条件
1准备两个集群
2两个集群前置配置xpack 设置true
3从集群配置角色 remote_cluster_client
4两个集群开启试用license 三、解题
Step 1、从集群配置主集群 leader
PUT /_cluster/settings
{persistent: {cluster: {remote: {leader: {seeds: [127.0.0.1:9300]}}}}
} 通过如下命令可以在从集群监测一下remote配置是否成功。
GET /_remote/info
Step 2、集群配置权限
在cluster2remote上配置对索引的只读权限
POST /_security/role/remote-replication
{cluster: [read_ccr],indices: [{names: [task],privileges: [monitor,read]}]
}
在cluster1 local上设置写角色
POST /_security/role/remote-replication
{cluster: [manage_ccr],indices: [{names: [task],privileges: [monitor,read,write,manage_follow_index]}]
}
Setp 3、创建自动跟踪模式以自动跟踪在远程集群中创建的索引 step 4、验证
在local 增加数据
POST task/_bulk
{create:{_id:1}}
{a:key,b:mom,c:mom}
{create:{_id:2}}
{a:key,b:cake mix,c:mom}
{create:{_id:3}}
{a:key,b:mom,c:cake mix}
{create:{_id:4}}
{a:cake mix,b:mom,c:mom}
在remote 查询数据
GET task_leader/_search
查询结果 四、总结
CCR 可以对标MySQL 理解为为主从。主节点负责写入数据从/备节点负责同步时主节点的数据。CCR 特性是否付费功能可以开启试用license 30天体验CCR 必须开启 Xpack从集群配置角色 remote_cluster_client 参考资料
Cross-cluster replication | Elasticsearch Guide [8.15] | ElasticCross-cluster replication APIs | Elasticsearch Guide [8.1] | Elastic 送一波福利
福利一
有需要内推JD的同学可以私信或留言我帮您内推流程快
有需要内推JD的同学可以私信或留言我帮您内推流程快
有需要内推JD的同学可以私信或留言我帮您内推流程快
福利二 福利三