Data Compression (gzip)¶
The MediaGrid supports JSON and Compressed JSON (gzip) as data formats for bid requests and
bid responses, as indicated using the Accept-Encoding: gzip
header. It is
recommended to use Compressed JSON to minimize the amount of data exchanged between
The MediaGrid and the Buyer, as this reduces latency times between servers without any
additional costs. Here is what The MediaGrid has observed with gzip traffic:
When enabled, gzip compression ratios tend to be in the range of x1.4 to x2.0 (depending on the size of the request/response)
There is no tangible extra CPU load due to compressing/decompressing traffic, i.e. there is no extra cost
Sending Bid Responses to The MediaGrid¶
Sending bid responses in Compressed JSON does not require special configuration. The
bidder is only required to send a Content-Encoding: gzip
header in the responses
where the compression is used.
Receiving Bid Requests from The MediaGrid¶
Once enabled, The MediaGrid starts sending bid requests in Compressed JSON. All such bid
requests carry an extra HTTP header Content-Encoding: gzip
. It is recommended for
the bidder to check for this HTTP header to distinguish between JSON and Compressed
JSON bid request formats, as even when compression is enabled some Bid Requests may
arrive uncompressed. In this case the Content-Encoding: gzip
header is absent.