ServiceNow web service interface performance (SOAP, JSONv2, REST) comparison
Back in business after summer vacation. Since the Eureka release is now out and first customers have started to use it, I decided to run some tests to verify whether or not the ServiceNow's new REST API is as fast as I have come to believe it would be.
Based on my first tests, using SOAP UI as client, I am very disappointed. My hypothesis was, based on REST APIs on other systems, that the ServiceNow REST API would be significantly faster than others. That hypothesis is not supported by my findinds.
Test overview
The test cases I chose for this case were to 1) GET an Incident record, and 2) INSERT an Incident record with minimal (just short_description) information.
In the test cases I only looked at how many transactions were performed in a 30 second window, since the transaction amount is usually the interesting thing for me from the performance point of view. The throughput in bits/bytes did not interest me in this case.
The test was run against an Eureka release demo instance.
The test was run against an Eureka release demo instance.
GET
In the GET scenario I am not doing anything special, and each interface returns the default response format. So SOAP returns something like this
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<getResponse>
<active>1</active>
...
<work_notes_list/>
<work_start/>
</getResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
JSONv2 returns something like this
{"records":REST responds with something like this (note that I am requesting an XML response from the REST API)
[
{
"skills": "",
...
"escalation": "3",
"comments": ""
}
]
}
<response>
<result>
<skills/>
...
<comments/>
</result>
</response>
INSERT
In order to make the cases as comparable as possible, in the INSERT scenarios I am limiting the response message's fields in the REST and JSONv2 requests since the SOAP interface always returns just the "number" and "sys_id" information and, that can not be changed.
In the REST API I used the "sysparm_fields" parameter and for JSONv2 interface I created a new view for Incident table which only contains those two fields and I use the "sysparm_view" parameter to make sure the interface uses that view when responding.
Results
The result for me was a bit of a shock. I had expected the REST API to outperform all the others, but in both scenarios the REST API was second, while SOAP outperformed others in the INSERT scenario and JSONv2 outperformed others in the GET scenario.
The numbers on the table indicate how many transactions were performed in a 30 second window by 5 threads in a SOAP UI Load Test. Red indicates the slowest interface while green indicates the fastest interface.
Since the results might be caused by the measurement tool itself, I would like to know if anyone else has had different results using some other tool.
No comments:
Post a Comment