Skip to main content
Uber logo

Schedule rides in advance

Reserve a rideReserve a ride

Schedule rides in advance

Reserve a rideReserve a ride
Engineering

How Uber Engineering Evaluated JSON Encoding and Compression Algorithms to Put the Squeeze on Trip Data

February 16, 2016 / Global
Featured image for How Uber Engineering Evaluated JSON Encoding and Compression Algorithms to Put the Squeeze on Trip Data
Encoding ProtocolSchema-based (IDL)
1Yes
2Yes
3Yes
4No
5No
6No
7No
8No
9No
10¹No
EncoderEncode (ms)Decode (ms)Size (bytes)Size FactorSpeed Factor
PROTOBUF zlib215892510,885,01846%34%
THRIFT bz25531200311,178,01847%82%
PROTOBUF bz25111173812,023,40851%75%
THRIFT zlib1817114712,451,28553%32%
PROTOBUF Snappy122479014,694,13062%22%
CBOR zlib2573261118,290,63078%57%
MESSAGEPACK zlib423171518,312,10678%54%
MARSHAL zlib2095141618,567,29679%38%
THRIFT Snappy628101119,003,26781%18%
UJSON zlib2956116519,917,71685%45%
JSON zlib5561358623,560,699100%100%
EncoderEncode (ms)Decode (ms)Size (bytes)Size FactorSpeed Factor
MESSAGEPACK zlib423171518,312,10678%54%
CBOR zlib2573261118,290,63078%57%
MARSHAL zlib2095141618,567,29679%38%
UJSON zlib2956116519,917,71685%45%
JSON zlib5561358623,560,699100%100%
EncoderEncode (ms)Decode (ms)Size (bytes)Size FactorSpeed Factor
JSON32603275132,852,837564%71%
MESSAGEPACK zlib423171518,312,10678%54%
Kåre Kjelstrøm

Kåre Kjelstrøm

Kare is a senior engineering manager on Uber's Core Infrastructure team.

Posted by Kåre Kjelstrøm

Category: