Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

Commit

Permalink
Continued work on Load testing #11
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencegripper committed Nov 14, 2017
1 parent bfdd3a6 commit a2fbd32
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Demos/apps/loadtest/WebServicePkg/ServiceManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<Extensions>
<Extension Name="Traefik">
<Labels xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
<Label Key="traefik.frontend.rule.default">PathPrefixStrip: /v1</Label>
<Label Key="traefik.frontend.rule.default">PathPrefixStrip: /bignode</Label>
<Label Key="traefik.frontend.priority">10</Label>
<Label Key="traefik.backend.group.name">bignode</Label>
<Label Key="traefik.expose">true</Label>
</Labels>
</Extension>
Expand All @@ -23,7 +25,7 @@
</EntryPoint>
<EnvironmentVariables>
<EnvironmentVariable Name="NODE_PORT" Value="[Port]"/>
<EnvironmentVariable Name="RES_STRING" Value="Hello World"/>
<EnvironmentVariable Name="RES_STRING" Value="[Response]"/>
</EnvironmentVariables>
</CodePackage>
<Resources>
Expand Down
7 changes: 7 additions & 0 deletions Testing/Cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sfctl application list --query items[].id -o tsv | grep node | xargs -n 1 -P 12 sfctl application delete --application-id
sfctl application unprovision --application-type-name NodeAppType --application-type-version 1.0.0
sfctl store delete --content-path loadtest

sfctl application delete --application-id traefik
sfctl application unprovision --application-type-name TraefikType --application-type-version 1.0.0
sfctl store delete --content-path ApplicationPackageRoot
6 changes: 3 additions & 3 deletions Testing/Scenario1/Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ sfctl application create --app-type TraefikType --app-version 1.0.0 --app-name f


sfctl application upload --path ./Demos/apps/loadtest
sfctl application provision --application-type-build-path ./loadtest
for i in {30..300}
sfctl application provision --application-type-build-path loadtest
for i in {348..500}
do
( echo "Deploying instance $i"
sfctl application create --app-type NodeAppType --app-version 1.0.0 --parameters "{\"PORT\":\"90$i\"}" --app-name fabric:/node$i ) &
sfctl application create --app-type NodeAppType --app-version 1.0.0 --parameters "{\"PORT\":\"25$i\"}" --app-name fabric:/node25$i ) &
done
16 changes: 16 additions & 0 deletions Testing/Scenario2/Setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#Traefik install
sfctl application upload --path ./Traefik/ApplicationPackageRoot/
sfctl application provision --application-type-build-path ApplicationPackageRoot
sfctl application create --app-type TraefikType --app-version 1.0.0 --app-name fabric:/traefik

#Spin up some node apps
sfctl application upload --path ./Demos/apps/loadtest
sfctl application provision --application-type-build-path loadtest
for i in {100..120}
do
( echo "Deploying instance $i"
sfctl application create --app-type NodeAppType --app-version 1.0.0 --parameters "{\"PORT\":\"25$i\", \"RESPONSE\":\"25$i\"}" --app-name fabric:/node25$i ) &
done


#Run load test
9 changes: 9 additions & 0 deletions Traefik/ApplicationPackageRoot/TraefikPkg/Code/traefik.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ address = ":80"
#
address = ":9000"

# To enable Traefik to export internal metrics to Prometheus
[web.metrics.prometheus]

# Buckets for latency metrics
#
# Optional
# Default: [0.1, 0.3, 1.2, 5]
buckets=[0.1,0.3,1.2,5.0]

################################################################
# Service Fabric provider
################################################################
Expand Down

0 comments on commit a2fbd32

Please sign in to comment.