[ 
https://issues.apache.org/jira/browse/STRATOS-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169244#comment-14169244
 ] 

Nirmal Fernando commented on STRATOS-716:
-----------------------------------------

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.

> Support for manual scaling
> --------------------------
>
>                 Key: STRATOS-716
>                 URL: https://issues.apache.org/jira/browse/STRATOS-716
>             Project: Stratos
>          Issue Type: New Feature
>          Components: Autoscaler
>            Reporter: Nirmal Fernando
>            Assignee: Nirmal Fernando
>             Fix For: 4.1.0 M2
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to