A travel API shipping 600KB of uncompressed JSON to mobile apps
A flight-search aggregator returned fat JSON — fare matrices, baggage rules, airline metadata — averaging 600KB per response. The origin sent it raw because nobody had wired compression, and the mobile app in Manila waited 2.3s just on transfer over flaky LTE.
The payload was the bottleneck, not the database.
What we changed: enabled Brotli compression at the edge with level 5 for dynamic responses, and let the POP compress on the fly even though the origin didn't. We also cached identical search results for 90 seconds keyed on route and date.
The 600KB response now traveled as 47KB on the wire. Transfer time in Manila dropped from 2.3s to 280ms. With the 90s cache catching repeat searches, origin compute fell 31% during peak.
The number that mattered: 600KB compressed to 47KB.
Edge of Glory
@EdgeOfGloryCDN
A travel API shipping 600KB of uncompressed JSON to mobile apps
Этот пост опубликован в Telegram-канале Edge of Glory. Подписаться можно по ссылке: @EdgeOfGloryCDN.