delphidelphi-11-alexandriarad-server

How to configure RAD Server to send compressed responses?


I'm building a prototype for a new C/S app using RAD Server.

I want to get compressed some large requests to speed up their transmission, so I send them with Accept-Encoding to gzip on their Header, as explained here for generic REST servers:

https://www.developer-experts.net/en/2018/10/12/better-performance-with-rest-compression/

But my RAD Server still serves those requests in plain text. Do I have to check myself the Accept-Encoding Header on the server side and compress those responses ?

The "The Complete Guide to Embarcadero RAD Server eBook" doesn't have any mentions to gzip, Accept-Encoding, Compression, ... and I haven't been able to find any other documentation about compressing RAD Server requests, so I don't know if the problem is that I have to program that compression myself or I need to configure RAD Server so it reacts to the Accept-Encoding received.


Solution

  • In production RAD Server should be running on a Web Server which can be configured to do the compression if desired. Running RAD Server standalone is really just for convenience while doing development and testing.

    Both IIS and Apache have settings to compress dynamic content like what RAD Server generates.