Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-4906

Admin Router service endpoint: forward Accept-Encoding header to upstream

    Details

    • Type: Task
    • Status: Resolved
    • Priority: High
    • Resolution: Done
    • Affects Version/s: DC/OS 1.13
    • Fix Version/s: DC/OS 1.13.0
    • Component/s: adminrouter
    • Labels:
      None

      Description

      The admin router's /service/ location strips the Accept-Encoding header from requests before proxying them to a backend: https://github.com/dcos/dcos/blob/86a6934657c3d1c22f77d3cd21e112f940988043/packages/adminrouter/extra/src/includes/service-location.common.conf#L1

      This prevents a service from compressing its responses, which may have a noticeable impact. An example is the dcos-monitoring package's Grafana UI, which sends a lot of data between the browser and the server. Gzipping this data makes Grafana much quicker to load, and makes certain features more responsive, such as metric name autocompletion.

      These screenshots show requests to dcos-monitoring's Overview dashboard (cluster is in AWS, client is on SF office wifi, browser cache is disabled). The first request is with the adminrouter from master, and the second request is with an adminrouter that has the line linked above commented out. Gzip reduces the total page size from 5 MB to 1.6 MB, and the page load time from 1.18 s to 972 ms.

      (The Content-Encoding of responses isn't in these screenshots, but I confirmed that it was not present in the first example, and gzip in the second example.)

        Attachments

          Activity

            People

            • Assignee:
              branden Branden Rolston
              Reporter:
              branden Branden Rolston
              Team:
              Observability Team
              Watchers:
              Branden Rolston, Daniel Baker, Jan-Philip Gehrcke, Jie Yu, Jonathan Giddy
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: