Vlad A. Ionescu
Vlad A. Ionescu

Reputation: 2788

Compression when using the Channel API in Google App Engine

In this FAQ question it says that compression is used automatically when the browser supports it and that I don't need to modify my application in any way.

My question is, does that apply to Channel API messages too?

I have an application that needs to send relatively large JSON (text) data through a persistent connection and I'm hoping I can get things through faster if they are compressed.

If not, I can think of a workaround to have the server send just a ping through the channel when a big load comes through and have the browser then make a GET request to fetch it (and that would "automatically" compress it), but that would add the latency of another request.

Upvotes: 2

Views: 119

Answers (1)

Moishe Lettvin
Moishe Lettvin

Reputation: 8471

Data sent over the connection the Channel API uses is gzip compressed.

However, Channel API messages are limited to 32K uncompressed, so for anything bigger than that you'll need to use the ping/GET method anyway.

Upvotes: 3

Related Questions