Skip to content

Commit

Permalink
Added a simple scale test for L4 ILB
Browse files Browse the repository at this point in the history
Incorporated review comments from @krzseid
  • Loading branch information
prameshj committed Aug 5, 2019
1 parent 7737559 commit 9525798
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 0 deletions.
120 changes: 120 additions & 0 deletions clusterloader2/testing/l4ilb/config.yaml
@@ -0,0 +1,120 @@
#Constants
{{$LARGE_BACKEND_SIZE := 300}}
{{$MEDIUM_BACKEND_SIZE := 150}}
{{$SMALL_BACKEND_SIZE := 10}}
# adding a fixed value for first version of the test, rate of pod creation not a concern yet.
{{$ilbQPS := 500}}
{{$namespaces := 1}}
#Test
name: ilbload
automanagedNamespaces: {{$namespaces}}
tuningSets:
- name: ILBConstantQPS
qpsLoad:
averageQps: {{$ilbQPS}}
steps:
# Create ILBs
- measurements:
- Identifier: ServiceCreationLatency
Method: ServiceCreationLatency
Params:
action: start
- Identifier: WaitForRunningDeployments
Method: WaitForControlledPodsRunning
Params:
action: start
apiVersion: apps/v1
kind: Deployment
operationTimeout: 15m

- phases:
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 1
tuningSet: ILBConstantQPS
objectBundle:
- basename: large-backends-dep
objectTemplatePath: dep.yaml
templateFillMap:
ReplicasMin: {{$LARGE_BACKEND_SIZE}}
ReplicasMax: {{$LARGE_BACKEND_SIZE}}
- basename: large-backends-service
objectTemplatePath: service.yaml
templateFillMap:
DeploymentBaseName: large-backends-dep
- phases:
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 1
tuningSet: ILBConstantQPS
objectBundle:
- basename: medium-backends-dep
objectTemplatePath: dep.yaml
templateFillMap:
ReplicasMin: {{$MEDIUM_BACKEND_SIZE}}
ReplicasMax: {{$MEDIUM_BACKEND_SIZE}}
- basename: medium-backends-service
objectTemplatePath: service.yaml
templateFillMap:
DeploymentBaseName: medium-backends-dep
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 1
tuningSet: ILBConstantQPS
objectBundle:
- basename: small-backends-dep
objectTemplatePath: dep.yaml
templateFillMap:
ReplicasMin: {{$SMALL_BACKEND_SIZE}}
ReplicasMax: {{$SMALL_BACKEND_SIZE}}
- basename: small-backends-service
objectTemplatePath: service.yaml
templateFillMap:
DeploymentBaseName: small-backends-dep
- name: Creating ILBs
- measurements:
- Identifier: ServiceCreationLatency
Method: ServiceCreationLatency
Params:
action: waitForReady
# Delete ILBs
- phases:
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: ILBConstantQPS
objectBundle:
- basename: large-backends-service
objectTemplatePath: service.yaml
- basename: large-backends-dep
objectTemplatePath: dep.yaml
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: ILBConstantQPS
objectBundle:
- basename: medium-backends-service
objectTemplatePath: service.yaml
- basename: medium-backends-dep
objectTemplatePath: dep.yaml
- namespaceRange:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: ILBConstantQPS
objectBundle:
- basename: small-backends-service
objectTemplatePath: service.yaml
- basename: small-backends-dep
objectTemplatePath: dep.yaml
- name: Deleting ILBs
- measurements:
- Identifier: ServiceCreationLatency
Method: ServiceCreationLatency
Params:
action: gather
19 changes: 19 additions & 0 deletions clusterloader2/testing/l4ilb/dep.yaml
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
spec:
replicas: {{RandIntRange .ReplicasMin .ReplicasMax}}
selector:
matchLabels:
name: {{.Name}}
template:
metadata:
labels:
name: {{.Name}}
spec:
containers:
- name: {{.Name}}
image: nginx
ports:
- containerPort: 8080
13 changes: 13 additions & 0 deletions clusterloader2/testing/l4ilb/service.yaml
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{.Name}}
annotations:
cloud.google.com/load-balancer-type: "Internal"
spec:
type: LoadBalancer
selector:
name: {{.DeploymentBaseName}}-{{.Index}}
ports:
- port: 8080
targetPort: 80

0 comments on commit 9525798

Please sign in to comment.