Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-716

Support for manual scaling for Docker Clusters

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0 RC3
    • Component/s: Autoscaler
    • Labels:
      None

      Description

      It's important that we have an option to scale nodes manually, so that as a user you could prepare for high load before hand. While implementing this feature, it's also important to decide whether we should consider these manually spawned instances for the auto-scaling decision. IMO we shouldn't do that, otherwise even if we manually spin up instances, they'll be terminated by the auto-scaler, if there's no actual load. One other important is whether we should consider stats of these manually scaled nodes. IMO again we shouldn't do that, otherwise it'll lead the auto-scaler to take incorrect decisions. We need to discuss these points and also other important points in the mailing list and decide.

        Activity

        Hide
        nirmal Nirmal Fernando added a comment -

        I've implemented this for Kubernetes - Docker scenario.

        Implementation Details:

        Autoscaler provides an API to update a cluster monitor created for a particular cluster, by accepting set of properties. Autoscaler API implementation delegates such a request to relevant cluster monitor via AbstractClusterMonitor. It's up to that particular Cluster Monitor to decide, what properties to read and what properties it'll update.

        REST API

        curl -X PUT -H "Content-Type: application/json" -d @manual-scaling.json -k -v -u admin:admin https://localhost:9443/stratos/admin/subscriptions/

        {subscriptionAlias}

        /properties

        Sample manual-scaling file:

        {
        "property": [

        { "name": "KUBERNETES_REPLICAS_MIN", "value": "4" }

        ]
        }

        CLI command:

        stratos> help update-subscription
        Update a previously made subscription.
        usage: update-subscription [cartridge-subscription-alias] [-p <resource
        path>]
        p,-resource-path <resource path> Update subscription properties resource path

        stratos> update-subscription myphp --resource-path /Volumes/wso2/stratos-4.1.0/M1/manual-scaling.json
        Successfully updated subscription alias: myphp

        We can improve this feature further.

        Show
        nirmal Nirmal Fernando added a comment - I've implemented this for Kubernetes - Docker scenario. Implementation Details: Autoscaler provides an API to update a cluster monitor created for a particular cluster, by accepting set of properties. Autoscaler API implementation delegates such a request to relevant cluster monitor via AbstractClusterMonitor. It's up to that particular Cluster Monitor to decide, what properties to read and what properties it'll update. REST API curl -X PUT -H "Content-Type: application/json" -d @manual-scaling.json -k -v -u admin:admin https://localhost:9443/stratos/admin/subscriptions/ {subscriptionAlias} /properties Sample manual-scaling file: { "property": [ { "name": "KUBERNETES_REPLICAS_MIN", "value": "4" } ] } CLI command: stratos> help update-subscription Update a previously made subscription. usage: update-subscription [cartridge-subscription-alias] [-p <resource path>] p, -resource-path <resource path> Update subscription properties resource path stratos> update-subscription myphp --resource-path /Volumes/wso2/stratos-4.1.0/M1/manual-scaling.json Successfully updated subscription alias: myphp We can improve this feature further.
        Hide
        lahirugamage Lahiru Sandaruwan added a comment -

        According the discussion we had in dev, we have decided to do this by allowing to change min and max values of running cluster.

        Show
        lahirugamage Lahiru Sandaruwan added a comment - According the discussion we had in dev, we have decided to do this by allowing to change min and max values of running cluster.

          People

          • Assignee:
            nirmal Nirmal Fernando
            Reporter:
            nirmal Nirmal Fernando
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development