Should i encode tiny API responses? Something like only single or couple json objects ( { “msg”: true } )
I guess encoding a tiny response especially with gzip will increase response length. Am i right?
If yes, which algorithm/algorithms should i use?
piranha
(Alexander Solovyov)
May 6, 2020, 12:05pm
2
I think if small responses are not overwhelming majority of your traffic you don’t really need to worry about them. Just enable encoding and don’t worry about it too much.
3 Likes
matt
(Matt Holt)
May 6, 2020, 7:35pm
3
The encode
middleware already will not compress small responses. Its threshold is currently 512 bytes.
1 Like
system
(system)
Closed
June 5, 2020, 7:35pm
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.