SignalR/WebSocket - Support for permessage-deflate RRS feed

  • Question

  • User-1577461908 posted

    Is there a way to enable permessage-deflate compression for WebSocket response in SignarlR. Our server payload is 15K, which can be compressed to save 90% of the traffic while using long polling. But using websocket, data is not getting compressed. During handshake, client is sending "permessage-deflate" in request header, but response header does not have it.

    Monday, April 9, 2018 4:05 PM

All replies

  • User61956409 posted

    Hi bhabani200,

     As far as I know, SignalR transfers data in non-compressed JSON text or plain text. If you want the data in compressed, you need to write your own logic on the server side and the same logic on the client side also. I do not find documentations that show how to integrate permessage-deflate compression with SignalR. But if possible, you can try SignalR.Compression.

    With Regards,

    Fei Han

    Wednesday, April 11, 2018 5:27 AM
  • User-1577461908 posted

    Thanks for your reply. I checked it out, it changes the format to a bit more compact, but no where close to the compression achieved by Gzip or other compression technique. 

    Thursday, April 12, 2018 6:29 PM