marathon-lb | service discovery & load balancing tool | Load Balancing library

 by   mesosphere Python Version: v1.15.0 License: Apache-2.0

kandi X-RAY | marathon-lb Summary

kandi X-RAY | marathon-lb Summary

marathon-lb is a Python library typically used in Networking, Load Balancing applications. marathon-lb has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

Marathon-lb is a service discovery & load balancing tool for DC/OS
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              marathon-lb has a low active ecosystem.
              It has 448 star(s) with 306 fork(s). There are 148 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 81 open issues and 236 have been closed. On average issues are closed in 481 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of marathon-lb is v1.15.0

            kandi-Quality Quality

              marathon-lb has 0 bugs and 0 code smells.

            kandi-Security Security

              marathon-lb has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              marathon-lb code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              marathon-lb is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              marathon-lb releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed marathon-lb and discovered the below as its top functions. This is intended to give you an instant insight into marathon-lb implemented functionality, and help decide if they suit your requirements.
            • Load configuration
            • Get global default options
            • Argument parser
            • Set logging options
            • Set the arguments for Marathon authentication
            • Return list of available HAProxy templates
            • Try to reset the event
            • Validate the haproxy config file
            • Reload the configuration
            • Return the set of haproxy pids
            • Setup logging
            • Get marathon auth params
            • Process command line arguments
            • Fetch events from SSE active
            • Iterates over the chunks in chunks
            • Check status code
            • Return received data
            • Set the ports
            • Get an event stream
            • Called when a signal is received
            • Reload existing configuration
            • Reset all pending tasks
            • Start the thread
            • Set request retries
            • Stop the thread
            Get all kandi verified functions for this library.

            marathon-lb Key Features

            No Key Features are available at this moment for marathon-lb.

            marathon-lb Examples and Code Snippets

            No Code Snippets are available at this moment for marathon-lb.

            Community Discussions

            QUESTION

            Prometheus dynamic port service discovery with Marathon/Mesos
            Asked 2018-Dec-27 at 00:32

            I've been unable to find an answer to this after days of Googling. I have a service running in Marathon/Mesos. I have a Prometheus cluster scraping metrics. My Marathon metrics port config looks like this:

            ...

            ANSWER

            Answered 2018-Dec-27 at 00:32

            It is a known bug in Prometheus: it uses the servicePort Marathon app definition property instead of the hostPort one. It is fixed in the v2.6.0.

            Source https://stackoverflow.com/questions/53890083

            QUESTION

            Deploy Mesosphere Universe package like Marathon-lb via curl command
            Asked 2018-Oct-09 at 08:15

            We can deploy the package with dcos commands like

            ...

            ANSWER

            Answered 2018-Aug-28 at 11:54

            I added Marathon-LB from universe package then accessed http://azurehost.azure.com/marathon/v2/apps where I got the correct marathon application definition of Marathon-lb. Now I am using the same definition through curl command and it is working fine.

            Source https://stackoverflow.com/questions/51945525

            QUESTION

            DCOS connection refused on marathon-lb
            Asked 2017-Sep-17 at 18:52

            I have dcos up and running. I created a service and i am able to access it through the ip:port but when i try to do the same with marathon-lb i just cant reach it. I tried curl http://marathon-lb.marathon.mesos:10000/ 10000 being the port number, i still get connection refused.

            Here is my json for service:

            ...

            ANSWER

            Answered 2017-Sep-17 at 18:52

            Both accessing it from outside the cluster by using public-ip:10000 (see here for finding the public ip) and from inside the cluster using curl http://marathon-lb.marathon.mesos:10000/ worked fine. Note, you need to have marathon-lb installed (dcos package install marathon-lb) and marathon-lb.marathon.mesos can only be resolved from inside the cluster.

            In order to debug marathon-lb issues I ususally check the haproxy stats first: https://dcos.io/docs/1.9/networking/marathon-lb/marathon-lb-advanced-tutorial/#deploy-an-external-load-balancer-with-marathon-lb

            From outside the cluster

            From inside the cluster

            Source https://stackoverflow.com/questions/46267320

            QUESTION

            how to scale down instances based on their uptime with apache marathon?
            Asked 2017-Aug-25 at 12:28

            I find myself in a situation where I have the necessity to scale down container instances based on their actual lifetime. It looks like fresh instances are removed first when scaling down through marathon's API. Is there any configuration I'm not aware of to implement this kind of strategy or policy when scaling down instances on apache marathon?

            As of right now I'm using marathon-lb-autoscale to atumatically adjust the number of running instances. What actually happens under the hood though is that marathon-lb-autoscale does perform a PUT request updating the instances property of the current application when req/s increases or decreaseas.

            ...

            ANSWER

            Answered 2017-Aug-25 at 12:28

            One can specify a killSelection directly inside the application's config and specify YoungestFirst which kills youngest tasks first or OldestFirst which kills the oldest ones first.

            Reference: https://mesosphere.github.io/marathon/docs/configure-task-handling.html

            Source https://stackoverflow.com/questions/45878639

            QUESTION

            Marathon-lb rules for different paths
            Asked 2017-Aug-03 at 08:58

            My marathon-lb configuration:

            ...

            ANSWER

            Answered 2017-Aug-03 at 08:58

            As you probably know marathon-lb is HAProxy plus some wrappers. You can add a redirect to HAProxy configuration, by using HAPROXY_0_BACKEND_HTTP_OPTIONS label. There's a legacy reqrep statement which you may find convenient and you can also go for 301 redirect. For example you can do:

            "HAPROXY_0_BACKEND_HTTP_OPTIONS": " reqrep ^/([\w\-]+?)$ /results?q=\\1 \n",

            or

            "HAPROXY_0_BACKEND_HTTP_OPTIONS": " acl is_foo path -i /foo \n redirect code 301 location /bar if is_foo\n",

            Note double spaces for indent. Not that you'll have to play with escapes to make it work.

            Source https://stackoverflow.com/questions/45344394

            QUESTION

            How to configure subdomain for Azure DCOS?
            Asked 2017-Jul-15 at 15:07

            I've installed my application on azure DCOS container service. I use marathon-lb to map docker containers to the external point. Config looks like:

            ...

            ANSWER

            Answered 2017-Jul-15 at 15:07

            Nothing prevents you from doing that, add a cname alias to api1.my-site.com pointing to api1.mycustomename-devagents.westeurope.cloudapp.azure.com and you are done.

            Source https://stackoverflow.com/questions/45116219

            QUESTION

            Marathon Service Ports
            Asked 2017-Apr-28 at 15:39

            I know that 'servicePort' is used by marathon-lb to identify an app. Is there any other user of this setting besides marathon-lb?
            If the answer is no, why is it mandatory (omitting it well generate one for me)? I have many marathon apps which are not managed by marathon-lb, and they all take up service ports by default.

            ...

            ANSWER

            Answered 2017-Apr-28 at 15:39

            From the documentation: ""servicePort" is a helper port intended for doing service discovery using a well-known port per service. The assigned servicePort value is not used/interpreted by Marathon itself but supposed to be used by the load balancer infrastructure."

            So service ports seem to have no other use other than for marathon-lb. When you don't specify a servicePort, its as if you put in "servicePort": 0. See closed issue here.

            Here's a discussion about the re-architected networking API.

            If you look at the Jira ticket, you will see that the new API model lets you define services without servicePorts at all.

            Source https://stackoverflow.com/questions/43641415

            QUESTION

            How to config Marathon-lb to load balance a service launched in HOST network?
            Asked 2017-Mar-28 at 11:23

            I have a cluster managed by DC/OS and a dockerized service that I want to deploy through Marathon. I already have a marathon-lb that is being used for service discovery and load balancing of other existing services. All these services are deployed using BRIDGE network.

            The new service exposes more than one ports. Port A is for communication between the instances of the service and port B is for accepting requests from the world. I want to use HOST (and not BRIGE) network for deploying the service.

            I would like to know how to configure the json of the service in order for marathon-lb to load-balance and expose externally port B.

            I have already tried various scenarios and configurations but none worked. The json that I have constructed is the below.

            ...

            ANSWER

            Answered 2017-Jan-11 at 17:51

            It looks like you have requirePorts in the wrong section of the app definition. It should be at the top level, like this:

            Source https://stackoverflow.com/questions/41593231

            QUESTION

            DC/OS virtual network doesn't work across agents
            Asked 2017-Feb-25 at 01:29

            I have successfully created host and bridge mode marathon apps without issue, and used l4lb and marathon-lb to host them. That all works without a problem.

            I'm now trying to use USER mode networking, using the default "dcos" 9.0.0.0/8 network. In this mode my apps can only talk to other containers on the same agent. The host OS's can only talk to containers hosted on themselves. It appears that nodes can't route traffic between each other on the virtual network.

            For testing I'm using the docker "nginx:alpine" container, with 2 instances, on different hosts. Their IPs are 9.0.6.130 and 9.0.3.130. No L4LB or Marathon-LB config, no service endpoints, no ports exposed on the host network. Basically:

            ...

            ANSWER

            Answered 2017-Feb-25 at 01:29

            Figured this out with help from the DC/OS community mailing list.

            RHEL7 installs firewalld by default, which DC/OS needs disabled. I had done that, but that still leaves the FORWARD policy as DROP until the node is rebooted. DC/OS's firewall manipulation only changes the rules, not the default policy.

            This fixes it:

            Source https://stackoverflow.com/questions/42147318

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install marathon-lb

            Take a look at the marathon-lb wiki for example usage, templates, and more.
            Using marathon-lb
            Securing your service with TLS/SSL (blog post)

            Support

            Marathon-lb supports load balancing for applications that use the Mesos IP-per-task feature, whereby each task is assigned unique, accessible, IP addresses. For these tasks services are directly accessible via the configured discovery ports and there is no host port mapping. Note, that due to limitations with Marathon (see mesosphere/marathon#3636) configured service ports are not exposed to marathon-lb for IP-per-task apps. For these apps, if the service ports are missing from the Marathon app data, marathon-lb will automatically assign port values from a configurable range if you specify it. The range is configured using the --min-serv-port-ip-per-task and --max-serv-port-ip-per-task options. While port assignment is deterministic, the assignment is not guaranteed if you change the current set of deployed apps. In other words, when you deploy a new app, the port assignments may change.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Load Balancing Libraries

            ingress-nginx

            by kubernetes

            bfe

            by bfenetworks

            metallb

            by metallb

            glb-director

            by github

            Try Top Libraries by mesosphere

            marathon

            by mesosphereScala

            mesos-dns

            by mesosphereGo

            playa-mesos

            by mesosphereShell

            chaos

            by mesosphereScala

            RENDLER

            by mesospherePython