我在dcos上使用marathon-lb。当负载增加时,我得到一个错误'达到最大连接数'和马拉松-lb失败。
所以我试图让多个marathon-lb实例运行在同一个节点上,配置如下。但这不起作用,当我尝试健康检查时失败。另一方面,如果我给出hostport值(9090),则一个实例成功运行,第二个实例继续等待。所以无论我有什么工作都无法工作。
不是Brdige网络支持来帮助运行多个实例吗?任何帮助表示赞赏..
{
"id": "/marathon-lb-test3",
"acceptedResourceRoles": [
"slave_public"
],
"args": [
"sse",
"-m",
"http://marathon.mesos:8080",
"--group",
"external"
],
"backoffFactor": 1.15,
"backoffSeconds": 1,
"container": {
"portMappings": [
{
"containerPort": 80,
"hostPort": 0,
"protocol": "tcp",
"servicePort": 10001
},
{
"containerPort": 9090,
"hostPort": 9090,
"protocol": "tcp",
"servicePort": 10006
},
{
"containerPort": 443,
"hostPort": 0,
"protocol": "tcp",
"servicePort": 10007
},
{
"containerPort": 9091,
"hostPort": 0,
"protocol": "tcp",
"servicePort": 10008
},
{
"containerPort": 8080,
"hostPort": 0,
"protocol": "tcp",
"servicePort": 8080
}
],
"type": "DOCKER",
"volumes": [
{
"containerPath": "/marathon-lb/templates",
"hostPath": "/opt/marathon-lb/templates",
"mode": "RW"
}
],
"docker": {
"image": "mesosphere/marathon-lb:v1.11.1",
"forcePullImage": false,
"privileged": true,
"parameters": []
}
},
"cpus": 0.1,
"disk": 0,
"env": {
"HAPROXY_GLOBAL_DEFAULT_OPTIONS": "redispatch,httpclose,forceclose"
},
"healthChecks": [
{
"gracePeriodSeconds": 300,
"ignoreHttp1xx": false,
"intervalSeconds": 60,
"maxConsecutiveFailures": 3,
"portIndex": 1,
"timeoutSeconds": 20,
"delaySeconds": 15,
"protocol": "HTTP",
"path": "/_haproxy_health_check"
}
],
"instances": 2,
"maxLaunchDelaySeconds": 3600,
"mem": 1024,
"gpus": 0,
"networks": [
{
"mode": "container/bridge"
}
],
"requirePorts": false,
"upgradeStrategy": {
"maximumOverCapacity": 1,
"minimumHealthCapacity": 1
},
"killSelection": "YOUNGEST_FIRST",
"unreachableStrategy": {
"inactiveAfterSeconds": 300,
"expungeAfterSeconds": 600
},
"fetch": [],
"constraints": []
}
答案 0 :(得分:0)
如果您使用内部网络通信进行应用,则至少有2个免费的公共代理或将其从“外部”更改为“内部”,当您向群集DCOS添加新节点时,您可以设置为公共代理,一次这个节点中的马拉松负载,所以你DNS将在这个ip中解析域