Data Compression (gzip)¶
BidSwitch 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
BidSwitch and the Buyer, as this reduces latency times between servers without any
additional costs. Here is what BidSwitch 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 BidSwitch¶
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 BidSwitch¶
In order for the Buyer to receive Compressed JSON bid requests, please contact BidSwitch support at email@example.com.
Once enabled, BidSwitch 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.