1

I am using marathon-lb on dcos. When the load increases i get an error 'Maximum connections reached' and marathon-lb fails.

So i am trying to get multiple instances of marathon-lb running on the same node with below config. But this doesnt work, when i try the healthcheck it fails. On the other hand if i give hostport value (9090) one instance runs successfully and second instance keeps waiting. SO no matter what i cant have 2 instances working.

Isn't the Brdige network support to help run multiple instances? Any help is appreciated..

    {
  "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": []
}
Robin
  • 21
  • 2

1 Answers1

0

You have at least 2 free Public Agents or change it from "external" to "internal" if you aplications work with a internal network communications, when you add new node to cluster DCOS , you can set as public agent, once time that marathon load in this node, and so you DNS shall resolve domain in this ip

Adrian Romero
  • 537
  • 6
  • 13