This document provides the steps necessary to perform autoscale testing on the MobiledgeX platform.
apiserver/k8
subdirectory.jaypiserver.yaml
file as desired for your testing.mcctl
or the web gui, create an autoscale policy. A sample policy is shown below.
mcctl
or the web gui, create a cluster to be used by the application instances. A sample cluster configuration is shown below.
mcctl
or the web gui, create your application definition. A sample application configuration is shown below.
scalewithcluster
to true
.true
mcctl
or the web gui, create your application instance.
curl https://uri:publicport/posts
- key:
organization: <yourorg>
name: <yourpolicyname>
minnodes: 1
maxnodes: 4
scaleupcputhresh: 15
scaledowncputhresh: 5
triggertimesec: 30
- key:
clusterkey:
name: <yourcluster>
cloudletkey:
organization: <youroperator>
name: <yourcloudlet>
organization: <yourorg>
flavor:
name: m4.small
ipaccess: IpAccessShared
nodeflavor: m4.small
deployment: kubernetes
nummasters: 1
numnodes: 1
autoscalepolicy: <yourpolicyname>
- key:
organization: <yourorg>
name: <yourappname>
version: "<yourappversion>"
imagetype: ImageTypeDocker
accessports: tcp:3000:tls
defaultflavor:
name: m4.small
deployment: kubernetes
deploymentmanifest: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: jaypiserver\n
\ labels:\n app: jaypiserver\nspec:\n selector:\n matchLabels:\n app:
jaypiserver\n replicas: 1 \n template:\n metadata:\n labels:\n app:
jaypiserver\n spec:\n containers:\n - name: jaypiserver\n image:
qdzlug/jaypiserver\n ports:\n - containerPort: 3000\n---\napiVersion:
v1\nkind: Service\nmetadata:\n name: jaypiserver\nspec:\n selector:\n app:
jaypiserver\n ports:\n - protocol: TCP\n port: 3000\n targetPort:
3000\n type: LoadBalancer"
scalewithcluster: true
accesstype: AccessTypeLoadBalancer
The load generator is intended to be run as a docker image; once built it can be used on multiple machines to generate load from different clients. There is a detailed README.md
file in the loadgen
directory that explains the steps required in addition to the information here.
loadgen
directory.vegeta
load testing utility (linux/amd64) from the vegeta releases page.loadgen
docker build -t loadtest .
In testing with the m4.small based clusters, using 2-4 load generators managed to create sufficient load to observe scaling. The container takes three variables to help you tune and direct the load generations. These are:
Most of the testing that I’ve performed has used the following command line.
$ docker run --env THERATE=600 --env THEDURATION=240s --env THEURL=https://URI:PUBLICPORT/posts loadgen
metrics
subcommands to mcctl
.region ShowClusterInst
subcommand to mcctl
.events
subcommand to mcctl
. Note: As of this writing there is a change required for these events to show correctly that is currently in qa.