https://bz.apache.org/bugzilla/show_bug.cgi?id=63690

--- Comment #9 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Mark Thomas from comment #7)
> Small HTTP/2 packets are inefficient. Lots of them are considered to be
> abusive and in some servers (not Tomcat) result in a DoS. Tomcat has
> expanded its overhead protection to protect against such abusive traffic.
> The default settings considers any non-final DATA frame of less than 1024
> bytes abusive. The smaller the DATA frame, the more abusive it is considered.

1024 might be too high for a default, but the good news is that the "abusive"
threshold can be changed (right?).

Imagine an endpoint that is supposed to receive messages from a smart phone
tracking a user's geographical location. Let's think about the kinds of packets
you'd maybe expect to get. Let's assume JSON for a moment and that there isn't
a huge amount of other BS in the application: it's just doing what you'd
expect. An update message might look like this:

{
  "MessageType" : "LOC-Update",
  "Timestamp" : "2019-08-27T23:02:00Z",
  "Latitude" : 51.508107,
  "Longitude" : -0.075938
}

Including the trailing newline, that message is a mere 128 bytes. Imagine
sending one of those messages per second per client (which is pretty chatty,
but hey there are lots of crappy mobile apps out there, aren't there). If I
were designing such a service, I would even arrange to have the messages be
even smaller. There's no need to have such verbose JSON. Property names could
be changed, or, if the data format is relatively simple and/or fixed, a JSON
object could be converted into a JSON array and the property names are removed
entirely. The message could be as short as:

["2019-08-27T23:02:00Z",51.508107,-0.075938]

That's a scant 44 bytes.

Not every application will be sending large documents around.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to