views:

319

answers:

1

Hello, I would have question regarding web services. Let's say I have webservice client that has to perform under high load. And I cannot use another technology.

Is it possible somehow to keep the connection open for all requests, to avoid overhead when establishing new tcp/ip connections? And in case of managed environment, is it possible having kind of pooled web service connection as it is the case of jdbc connections or JCA??

I am currently working with stubs generated by sun's wsimport and cannot see any possibility how to keep the connection open.

thanks for comments

+1  A: 

HTTP Keep-Alive seems to be your answer.

Check these websites for details.

frunsi
sure, but how to set it up, as I dont have access to underlying socket?
johny
check the documentation. which classes are you using to generate http requests?
frunsi
Or, locally proxy it... at the client end, run a proxy capable of forwarding the requests over a single connection. That way your one-request-per-connections are done locally, which will be much faster than across the network.
Andrew McGregor
to Andrew: ok, that might be working solution. Thak you
johny
by default all connections in HTTP 1.1 are automatically keep-alive enabled, until mnetioned otherwise as "Connection: close"
Suraj Chandran