New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset compression does not work when assets are served on REST API listener #2670

Closed
bernd opened this Issue Aug 11, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@bernd
Member

bernd commented Aug 11, 2016

Expected Behavior

The assets served by the web interface should be compressed.

Current Behavior

The assets are not compressed anymore, this used to work in 2.1.0-beta.2.

image

image

Steps to Reproduce (for bugs)

  1. Open browser developer tools
  2. Switch to network tab
  3. Visit Graylog web interface
  4. Check the size of the plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.4f85f383a59224cb8447.js file.
  5. Check response headers, there is no Content-Encoding

Your Environment

  • Graylog Version: 2.1.0-beta.4-SNAPSHOT+d2363dd
  • Operating System: Ubuntu 14.04 LTS
  • Browser version: Google Chrome 52.0.2743.116

@bernd bernd added the bug label Aug 11, 2016

@bernd bernd added this to the 2.1.0 milestone Aug 11, 2016

@joschi

This comment has been minimized.

Contributor

joschi commented Aug 11, 2016

@bernd If you've configure the web interface and the Graylog REST API to use the same address and port, everything is being served by the Graylog REST API listener for which gzip compression is disabled by default: https://github.com/Graylog2/graylog2-server/blob/2.1.0-beta.3/misc/graylog.conf#L97-L99

My recommendation would be to simply activate GZIP by default for all listeners.

@bernd

This comment has been minimized.

Member

bernd commented Aug 12, 2016

@joschi Yes, we have to enable that, at least for assets. Otherwise the web interface is pretty hard to use over slower connections.

@dennisoelkers

This comment has been minimized.

Member

dennisoelkers commented Aug 12, 2016

Disabling GZIP for the web listeners per default was a very conservative decision. From my perspective we should enable it per default now, especially now that it's serving the web assets too.

@dennisoelkers dennisoelkers self-assigned this Aug 12, 2016

dennisoelkers added a commit that referenced this issue Aug 12, 2016

Enable gzip per default for REST API listener.
Due to the consolidation of the web and REST API listeners, this setting
is now becoming much more relevant for the performance of the web
interface. GZIP was disabled per default for the REST API in past
versions, which was a very conservative decision. Now that in certain
configurations the REST API listener also serves the web interface, this
setting is very important for performance, as the web interface assets
are quite big when delivering them uncompressed.

As there is no reason (and no negative experience with GZIP in the
past), it is now enabled per default.

Fixes #2670

@dennisoelkers dennisoelkers changed the title from Asset compression does not work to Asset compression does not work when assets are served on REST API listener Aug 12, 2016

@bernd bernd added S3 P2 labels Aug 15, 2016

@bernd bernd closed this in #2672 Aug 16, 2016

bernd added a commit that referenced this issue Aug 16, 2016

Enable gzip per default for REST API listener. (#2672)
Due to the consolidation of the web and REST API listeners, this setting
is now becoming much more relevant for the performance of the web
interface. GZIP was disabled per default for the REST API in past
versions, which was a very conservative decision. Now that in certain
configurations the REST API listener also serves the web interface, this
setting is very important for performance, as the web interface assets
are quite big when delivering them uncompressed.

As there is no reason (and no negative experience with GZIP in the
past), it is now enabled per default.

Fixes #2670

@kroepke kroepke added triaged and removed triaged labels Sep 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment