Binary payloads
While it's usually not relevant, if your microservice deals with a lot of data, using an alternative format can be an attractive option to increase performances and decrease the required network bandwidth without having to rely on GZIP.
The two widely used binary formats out there are Protocol Buffers (protobuf) and MessagePack.
Protocol buffers (https://developers.google.com/protocol-buffers) requires you to describe the data that's being exchanged into some schema that will be used to index the binary content.
It adds quite some work because all data that's transferred will need to be described in a schema and you will need to learn a new Domain Specific Language (DSL).
The following example is taken from the protobuf documentation: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access