Search code examples
javajsonspring-bootxmlhttprequestdata-transfer

Spring Boot slow XHR transfer rate


Im scratching my head over an performance issue with simple xhr requests in Spring BOOT. (2.2.4.RELEASE). The application is started as a fat jar, with an embedded tomcat webserver. (I have tried undertow as well, no difference).

The request is paging a large resultset in 500 entries per request. Resulting in response-payload size of 500 kb.

  1. The requests are filtered, using an OncePerRequestFilter for JWT authentication.12 - 16 milliseconds
  2. Then the default filter filterchain with 12 standard filters is executed. 2 milliseconds
  3. The data is fetched from a mysql database and wrapped in a Page object. 15 milliseconds
  4. Transerring the data. 3 seconds??

Even running the application from localhost the transfer of 500kb takes 1 second? What can i possibly debug to improve this performance.

For reference the timings from the browser: enter image description here

edit: the transfer rates of the server are

Server: goetel GmbH - Göttingen (id = 23610)
    ISP: #####
 Latency:     8.27 ms   (1.38 ms jitter)
 Download:   6051.81 Mbps (data used: 6.5 GB)                               
 Upload:     306.34 Mbps (data used: 138.4 MB)

Thanks in advance


Solution

  • Well for what it is worth, I found a workaround to this. This means I still do not have an explanation for the slow transfer speed. However, in order to workaround this, I have limited the amount of data which I proactively retreive from the server. The rest of the data is loaded reactively, when the user needs it. Sadly this means a loss of some functionality, but it seems the only solution for now.