Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

Commit 47a5264

Browse files
committed
Doc
1 parent 548a2c1 commit 47a5264

File tree

1 file changed

+54
-46
lines changed

1 file changed

+54
-46
lines changed

README.md

Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ This project aims to provide a complete set of tools needed to do simple perform
66

77
This repository contains configuration that makes it easy for everyone to reproduce performance comparisons of different HTTP based API gateway/manager products. The configuration and tests are open source, and contributions are encouraged.
88

9-
To simplify the tests suite, three roles are defined: *consumer*, *gateway* and *webserver*. Each of the roles have a simple specification, which makes it easy to swap software components for the different roles. It is also easy to add clonfiguration for new software components.
10-
11-
To run a performance test, each role must be filled by exactly one software component.
9+
To simplify the tests suite, three roles are defined: *consumer*, *gateway* and *webserver*. To run a performance test, each role must be filled by exactly one software component.
1210

1311
For performance comparisons, multiple performance tests are executed where one role switches software component (typically the gateway) between each run.
1412

@@ -20,70 +18,77 @@ The tests cover a limited set of features which are considered as basic function
2018

2119
Requests sent directly from the consumer to the webserver. The gateway is not part of the request handling, and does therefore not affect the results.
2220

23-
| Property | Value |
24-
|-------------|----------------------------------|
25-
| Request | GET http://webserver:8888/test00 |
21+
The requests should be sent according to the following specifications.
22+
23+
| Property | Value |
24+
|----------------|--------------|
25+
| Request method | GET |
26+
| Protocol | http |
27+
| Host | webserver |
28+
| Port | 8888 |
29+
| Request path | /test00 |
30+
| Headers | *none* |
2631

2732
**Test 01: HTTP routing**
2833

2934
Proxy consumer requests through the gateway to the upstream webserver.
3035

31-
| Property | Value |
32-
|-------------|--------------------------------|
33-
| Request | GET http://gateway:8080/test01 |
36+
| Property | Value |
37+
|----------------|--------------|
38+
| Request method | GET |
39+
| Protocol | http |
40+
| Host | gateway |
41+
| Port | 8080 |
42+
| Request path | /test01 |
43+
| Headers | *none* |
3444

3545
**Test 02: Key based authentication and authorization**
3646

3747
Authenticate, authorize and proxy consumer requests through the gateway to the upstream webserver.
3848

39-
| Property | Value |
40-
|-------------|--------------------------------|
41-
| Request | GET http://gateway:8080/test02 |
42-
| Header | apikey=key02 |
49+
| Property | Value |
50+
|----------------|--------------|
51+
| Request method | GET |
52+
| Protocol | http |
53+
| Host | gateway |
54+
| Port | 8080 |
55+
| Request path | /test02 |
56+
| Headers | apikey=key02 |
57+
4358

4459
**Test 03: Key based auth and rate limiting (high limit)**
4560

4661
Authenticate, authorize and proxy consumer requests through the gateway to the upstream webserver. All requests should be counted, but none should exceed the rate limitation.
4762

48-
| Property | Value |
49-
|-------------|--------------------------------|
50-
| Request | GET http://gateway:8080/test03 |
51-
| Header | apikey=key03 |
63+
| Property | Value |
64+
|----------------|--------------|
65+
| Request method | GET |
66+
| Protocol | http |
67+
| Host | gateway |
68+
| Port | 8080 |
69+
| Request path | /test03 |
70+
| Headers | apikey=key03 |
5271

5372
**Test 04: Key based auth and rate limit of 1 rps**
5473

5574
Authenticate, authorize and proxy consumer requests through the gateway to the upstream webserver. Only one request is allowed per second. The rest of the requests should be rejected.
5675

57-
| Property | Value |
58-
|-------------|--------------------------------|
59-
| Request | GET http://gateway:8080/test04 |
60-
| Header | apikey=key04 |
76+
| Property | Value |
77+
|----------------|--------------|
78+
| Request method | GET |
79+
| Protocol | http |
80+
| Host | gateway |
81+
| Port | 8080 |
82+
| Request path | /test04 |
83+
| Headers | apikey=key04 |
6184

6285
## Roles specification
6386

64-
There are three roles involved; consumers, gateways and webservers.
65-
6687
### Consumers
6788

6889
Configuration for each type of consumer is put in subdirectories in the ``consumers/`` directory. Each subdirectory should contain a ``deploy`` file that can be executed to install and prepare the consumer for load generation.
6990

70-
Wrappers to run the different tests should be put in ``/usr/local/bin/`` inside the consumer instance and named ``test00``, ``test01``, ..., ``textXX``.
71-
72-
**Reference test** (``test00``):
73-
74-
| Property | Value |
75-
|-------------|-----------|
76-
| Protocol | http |
77-
| Target host | webserver |
78-
| Target port | 8888 |
79-
80-
**Other tests** (``test01, ...``):
81-
82-
| Property | Value |
83-
|-------------|---------|
84-
| Protocol | http |
85-
| Target host | gateway |
86-
| Target port | 8080 |
91+
Wrappers to run the different tests should be put in ``/usr/local/bin/`` inside the consumer instance and named ``test00``, ``test01``, ..., ``textXX``. The wrappers should execute requests according to the test specifications.
8792

8893
### Gateways
8994

@@ -107,7 +112,10 @@ Configuration for each web server is put in subdirectories in the ``webservers/`
107112

108113
## Execution
109114

110-
Three instances running CentOS 7 x86_64 are needed to execute the tests, each which fulfills the role of the *consumer*, *gateway* or *webserver*.
115+
* Three instances running CentOS 7 x86_64 are needed to execute the tests, each which fulfills the role of the *consumer*, *gateway* or *webserver*.
116+
* Selinux should be disabled.
117+
* The EPEL7 repository should be enabled.
118+
* Root access is required.
111119

112120
### Deployment examples
113121

@@ -148,11 +156,11 @@ Build the three virtual instances using Vagrant.
148156
**4. Run tests**
149157

150158
vagrant ssh consumer
151-
sudo /usr/local/bin/test00
152-
sudo /usr/local/bin/test01
153-
sudo /usr/local/bin/test02
154-
sudo /usr/local/bin/test03
155-
sudo /usr/local/bin/test04
159+
/usr/local/bin/test00
160+
/usr/local/bin/test01
161+
/usr/local/bin/test02
162+
/usr/local/bin/test03
163+
/usr/local/bin/test04
156164
exit
157165

158166
**5. Interpret results**

0 commit comments

Comments
 (0)