建站平台如何转型成为电商分销的关键步骤是什么?

摘要:建站平台转型,电商分销主要做什么,体育设施建设网站,网站维护需要什么问题背景 换节点 我们线上有一套ES集群,三台机器,共运行了6个节点。一直在线上跑了几个月也一直没出什么问题。然
建站平台转型,电商分销主要做什么,体育设施建设网站,网站维护需要什么问题背景 换节点 我们线上有一套ES集群#xff0c;三台机器#xff0c;共运行了6个节点。一直在线上跑了几个月也一直没出什么问题。然而好巧不巧#xff0c;就在昨天#xff0c;集群中的3号节点磁盘出现故障#xff0c;导致机器直接瘫痪。本来大家觉得问题不大#xf…问题背景 换节点 我们线上有一套ES集群三台机器共运行了6个节点。一直在线上跑了几个月也一直没出什么问题。然而好巧不巧就在昨天集群中的3号节点磁盘出现故障导致机器直接瘫痪。本来大家觉得问题不大ES不是有容灾吗换个新节点上去不就能自动分配分片了。 unassigned 当我们信心满满换了个新节点上去之后集群状态一直为red我们发现一直存在180多个unassigned shards。 curl -XGET http://localhost:9200/_cluster/health{cluster_name: escluster,status: red,timed_out: false,number_of_nodes: 6,number_of_data_nodes: 6,active_primary_shards: 498,active_shards: 767,relocating_shards: 0,initializing_shards: 0,unassigned_shards: 185,delayed_unassigned_shards: 0,number_of_pending_tasks: 0,number_of_in_flight_fetch: 0,task_max_waiting_in_queue_millis: 0,active_shards_percent_as_number: 80.5672268907563 }curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED问题排查 分片恢复并发数❌ 既然出现Unassigned shards也就是说有一些分片未被分片。期初我们想当然的认为应该是节点新加入集群分片还没有完成恢复。为了加速分片分配我们调大了分片恢复并发数。 curl -XPUT http://localhost:9200/_cluster/settings -H Content-Type: application/json -d {persistent: {cluster.routing.allocation.node_concurrent_recoveries: 10 } }然而并没有什么卵用等了半天还是没什么变化。 allocation explain 随后我们使用allocation explain指令来查看分片的分配状态 curl -XGET http://localhost:9200/_cluster/allocation/explain?pretty通过unassigned_info我们可以看到NODE_LEFT就是说节点无了。last_allocation_status说的更明确no_valid_shard_copy没有有效的分片副本。allocate_explanation也说了cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster大意就是集群节点上找不到能用的副本。 我们也很疑惑啊为了让ES容灾ES索引默认都有1个副本的呀按照ES分片的策略副本分片不会和主分片分发在同一台机器上昨天宕机宕了1个节点不应该主分配与副本分片都丢失吧。
阅读全文