3 ms·
"Our clients send base64 encoded JSON objects to our edge server using HTTP GETs." Encoded json in get parameters? That's not what GET requests are for. use PO
by jvehent 13y ago
"Our clients send base64 encoded JSON objects to our edge server using HTTP GETs."
Encoded json in get parameters? That's not what GET requests are for. use POST requests for that, or you'll quickly be limited by the max size of a get request, somewhere around 8KB.
- dayjah 13y agoYes, totally agree on that part! In fact, we tend to have had bad experiences with URLs over 4KB. Fortunately most of our stats requests come in at about 1KB. We're in the process of moving over to POSTs. The second part of this series will go into more detail as to the "whys". The primary reason we use GETs is backwards compatibility; we wanted our new team to be a success and in ensuring that we thought carefully about the battles worth fighting - the Mixpanel stats client is a good one, so we opted for being "Mixpanel Protocol"-compatible; they use base64 encoded json blobs shipped using an HTTP GET, and thusly so do we.
- kcbanner 13y agoIf you are sending over 8KB of JSON, something is fucked
- opendais 13y agoI could see a bulk metric insert [e.g. a modified version of StatsD] being >8KB.