• consul单节点搭建


    1.consul要素:
    注册中心、配置中心、数据一致性
    2.注册中心:
    服务注册、服务发现、健康检查、高可用、高效率低延迟、跨数据中心
    3.consul--raft库
    4.serf封装八卦算法 
     
    2.consul搭建:
    --集群搭建配置信息:
    {
      "id": "/cms-poc/trial-production/components/consul/v1/node1",
      "backoffFactor": 1.15,
      "backoffSeconds": 1,
      "cmd": "consul agent -server -data-dir /consul/data -config-dir /consul/config -advertise 172.19.32.68 -datacenter dc001 -client 0.0.0.0 -ui",
      "constraints": [
        [
          "hostname",
          "IS",
          "172.19.32.68"
        ]
      ],
      "container": {
        "portMappings": [
          {
            "containerPort": 8300,
            "hostPort": 8300,
            "protocol": "tcp",
            "servicePort": 10059
          },
          {
            "containerPort": 8301,
            "hostPort": 8301,
            "protocol": "udp,tcp",
            "servicePort": 10060
          },
          {
            "containerPort": 8302,
            "hostPort": 8302,
            "protocol": "udp,tcp",
            "servicePort": 10061
          },
          {
            "containerPort": 8500,
            "hostPort": 8500,
            "labels": {
              "VIP_1": "/ms-consul:8500"
            },
            "protocol": "tcp",
            "servicePort": 10062
          },
          {
            "containerPort": 8600,
            "hostPort": 8600,
            "protocol": "tcp",
            "servicePort": 10063
          }
        ],
        "type": "DOCKER",
        "volumes": [
          {
            "containerPath": "/consul/data",
            "hostPath": "/data/consul/data",
            "mode": "RW"
          },
          {
            "containerPath": "/consul/config",
            "hostPath": "/data/consul/config",
            "mode": "RW"
          }
        ],
        "docker": {
          "image": "consul",
          "forcePullImage": false,
          "privileged": false,
          "parameters": []
        }
      },
      "cpus": 1,
      "disk": 0,
      "instances": 1,
      "maxLaunchDelaySeconds": 3600,
      "mem": 1024,
      "gpus": 0,
      "networks": [
        {
          "mode": "container/bridge"
        }
      ],
      "requirePorts": false,
      "upgradeStrategy": {
        "maximumOverCapacity": 1,
        "minimumHealthCapacity": 1
      },
      "killSelection": "YOUNGEST_FIRST",
      "unreachableStrategy": {
        "inactiveAfterSeconds": 0,
        "expungeAfterSeconds": 0
      },
      "healthChecks": [],
      "fetch": []
    }
  • 相关阅读:
    iOS开发UI—Button基础
    iOS开发UI—UIWindow介绍
    第43月第27天 nginx keeplike高可用
    第43月第23天 商品秒杀 乐观锁
    第43月第22天 github 工程 svn checkout ipa瘦身
    第43月第21天 h264文件格式
    第43月第17天 iOS 子线程开启、关闭runloop performSelector
    第43月第15天 nginx负载均衡 redis
    第43月第11天 kCVPixelFormatType_420YpCbCr8BiPlanarFullRange转rgb
    第43月第10天 uiimage写文件
  • 原文地址:https://www.cnblogs.com/crdhm12040605/p/14027879.html
Copyright © 2020-2023  润新知