Performance for SOAP and HTTP

Hi everyone, I hope someone can help me with the following problem.
I want to issue SOAP request from rails to connect to a legacy system
in the backend. First I tried savon as a SOAP client. Everything
worked fine, but the performance was bad. The following code

client =
client.http.headers[“Content-Type”] = “application/soap+xml;
client.wsdl.endpoint = “http://localhost:22234/calculator
client.wsdl.namespace = “
response = client.request :wsdl, “validate” do
soap.version = 2
soap.body ={ “code” => “some data as value” }

requires about 1000 ms to execute.

So I switched to http and tried the Restclient. But the following code

api_call = RestClient.get ‘http://localhost:3000/purchases

requires about 1000 ms to execute as well.

My last try was a simple http request

net=“”, 3000)
http = net.start

which itself requires 200 ms.

I ask myself:
Are these normal time values when working in a rails environment (I
expected something around 5-10ms)?
Is there anything wrong with my code or are there better solutions;
and what can I do to improve the timing?
Has anybody performance benchmarks for similar requests?

Thanks for any help and kind regards, Manni

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs