A performance comparative between a SOAP server and a REST server.
...
$> git clone [email protected]:irgalieri/rest101.git
$> cd rest101
...
- First run SOAP server
$> php -S 127.0.0.1:8080 soap/server.php
- Second run REST server
$> php -S 127.0.0.1:8081 rest/server.php
-
Third open the file rest101-soap-vs-rest-soapui-project.xml with soapui
-
Finally run the load test cases (for more info see Load Testing).
All these values were obtained running soapUI load test case with n threads for 60 seconds.
| threads | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
|---|---|---|---|---|---|---|---|
| min. [ms] | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| max. [ms] | 4 | 12 | 5 | 5 | 12 | 6 | 10 |
| avg. [ms] | 2.1 | 2.18 | 2.16 | 2.21 | 2.15 | 1.99 | 2.07 |
| threads | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
|---|---|---|---|---|---|---|---|
| min. [ms] | 2 | 2 | 2 | 2 | 1 | 1 | 1 |
| max. [ms] | 12 | 17 | 224 | 18 | 12 | 16 | 16 |
| avg. [ms] | 5.27 | 5.3 | 5.93 | 5.4 | 4.9 | 4.68 | 4.24 |
The graphs of this comparison speaks for itself. And you can see the REST server response is twice faster than SOAP server.
