Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance of SOAP vs. XML-RPC or REST

The arguments about the simplicity of solutions using XML-RPC or REST are easy to understand and hard to argue with.

I have often also heard arguments that the increased overhead of SOAP may significantly impact used bandwidth and possibly even latency. I would like to see the results of a test that quantifies the impact. Any one know a good source for such information?

like image 873
Bradley Harris Avatar asked Sep 20 '08 00:09

Bradley Harris


People also ask

Does REST have better performance than SOAP?

REST allows a greater variety of data formats, whereas SOAP only allows XML. Coupled with JSON (which typically works better with data and offers faster parsing), REST is generally considered easier to work with. Thanks to JSON, REST offers better support for browser clients.

Is RPC faster than REST?

“gRPC is roughly 7 times faster than REST when receiving data & roughly 10 times faster than REST when sending data for this specific payload. This is mainly due to the tight packing of the Protocol Buffers and the use of HTTP/2 by gRPC.”

What is the difference between XML RPC and SOAP?

SOAP supports document-level transfer, whereas xml-rpc is more about values transfer, although it can transfer structures such as structs, lists, etc. xm-rpc is really about program to program language agnostic transfer. It primarily goes over http/https. SOAP messages can go over email as well.

Does SOAP use RPC?

(I should note that, technically speaking, SOAP is an example of a Remote Procedural Call, or RPC. RPC is a broad category of approaches for allowing different computers to communicate with each other.


1 Answers

The main impact in speed of SOAP vs. REST has not to do with wire speed, but with cachability. REST suggests using the web's semantics instead of trying to tunnel over it via XML, so RESTful web services are generally designed to correctly use cache headers, so they work well with the web's standard infrastructure like caching proxies and even local browser caches. Also, using the web's semantics means that things like ETags and automatic zip compression are well understood ways to increase efficiency.

..and now you say you want benchmarks. Well, with Google's help, I found one guy whose testing shows REST to be 4-6x faster than SOAP and another paper that also favors REST.

like image 80
pjz Avatar answered Sep 24 '22 20:09

pjz