views:

198

answers:

2

Hi,

i'm trying understand what are consequences of enabling compression for web service response. Web service is implemented as IIS hosted WCF service with http binding. I would like to add compression on http level, so it should be seamless for clients. Soap response size is in 100kb - 1Mb range. We do this to improve user experience on low-bandwidth network. What are drawbacks?

+1  A: 

100kb - 1Mb : Are you sending some form of binary data in your response such as files? In this case you can consider using MTOM which will optimize responses.

If it is only text then you could gain pretty much bandwidth by compressing the response. The only drawback I can think of is that it will not be interoperable (both server and clients need to implement it) and it will probably incur some CPU overhead.

Darin Dimitrov
+1  A: 

In my reading on this topic, what you are proposing is only seamless when the WCF client is Silverlight, because the browser then implements the client-side portion of the compression handshake. With a standard .net client, you would need additional code in place to make this work.

scolestock
Thanks, good point.
Ihar Voitka