This repository has been archived by the owner on Jul 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66723ec
commit bfdd3a6
Showing
7 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="NodeAppType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric"> | ||
<Parameters> | ||
<Parameter Name="Port" DefaultValue="" /> | ||
<Parameter Name="Response" DefaultValue="" /> | ||
</Parameters> | ||
<ServiceManifestImport> | ||
<ServiceManifestRef ServiceManifestName="WebServicePkg" ServiceManifestVersion="1.0.0" /> | ||
<ConfigOverrides /> | ||
<ResourceOverrides> | ||
<Endpoints> | ||
<Endpoint Name="NodeAppTypeEndpoint" Port="[Port]" /> | ||
</Endpoints> | ||
</ResourceOverrides> | ||
<EnvironmentOverrides CodePackageRef="Code"> | ||
<EnvironmentVariable Name="NODE_PORT" Value="[Port]" /> | ||
<EnvironmentVariable Name="RES_STRING" Value="[Response]" /> | ||
</EnvironmentOverrides> | ||
</ServiceManifestImport> | ||
<DefaultServices> | ||
<Service Name="WebService" ServicePackageActivationMode="ExclusiveProcess"> | ||
<StatelessService ServiceTypeName="WebServicePkg" InstanceCount="-1"> | ||
<SingletonPartition /> | ||
</StatelessService> | ||
</Service> | ||
</DefaultServices> | ||
</ApplicationManifest> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var http = require('http'); | ||
|
||
const PORT = process.env.NODE_PORT || 3000; | ||
const RESPONSE = process.env.RES_STRING || "Hello World" | ||
|
||
var server = http.createServer(function (req, res) { | ||
var body = RESPONSE; | ||
var content_length = body.length; | ||
res.writeHead(200, { | ||
'Content-Length': content_length, | ||
'Content-Type': 'text/plain' }); | ||
res.end(body); | ||
}); | ||
server.listen(PORT); | ||
console.log('Server is running on port ' + PORT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="WebServicePkg" Version="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric"> | ||
<ServiceTypes> | ||
<StatelessServiceType ServiceTypeName="WebServicePkg" UseImplicitHost="true"> | ||
<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.expose">true</Label> | ||
</Labels> | ||
</Extension> | ||
</Extensions> | ||
</StatelessServiceType> | ||
</ServiceTypes> | ||
<CodePackage Name="code" Version="1.0.0"> | ||
<EntryPoint> | ||
<ExeHost> | ||
<Program>node.exe</Program> | ||
<Arguments>server.js</Arguments> | ||
<WorkingFolder>CodeBase</WorkingFolder> | ||
<ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048"/> | ||
</ExeHost> | ||
</EntryPoint> | ||
<EnvironmentVariables> | ||
<EnvironmentVariable Name="NODE_PORT" Value="[Port]"/> | ||
<EnvironmentVariable Name="RES_STRING" Value="Hello World"/> | ||
</EnvironmentVariables> | ||
</CodePackage> | ||
<Resources> | ||
<Endpoints> | ||
<Endpoint Name="NodeAppTypeEndpoint" Port="3000" UriScheme="http"/> | ||
</Endpoints> | ||
</Resources> | ||
</ServiceManifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#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 | ||
|
||
|
||
sfctl application upload --path ./Demos/apps/loadtest | ||
sfctl application provision --application-type-build-path ./loadtest | ||
for i in {30..300} | ||
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 ) & | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## What are the Scenarios we're testing? | ||
|
||
# Scenario 1 - Large number of Apps/Services in Cluster | ||
|
||
When Traefik is running in a cluster with a large number of Apps and Services does it function correctly. Capture the following metrics with a low and a high number of apps and compare the difference. | ||
|
||
Metrics - the time take for: | ||
- A property override to become effective | ||
- An added service to become routable | ||
- Provider update to take place | ||
|
||
# Scenario 2 - Large number of requests | ||
|
||
When Traefik is hit with large volumes of traffic does it handle them well? | ||
|
||
TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters