Skip to content

Draft: baseline performance improvements

arkadiy requested to merge arkadiy/onionspray:main into main

This enables a couple of generally recognized as safe performance improvements in the default nginx config:

  • build openresty --with-http_v2_module (ConfigureOpenResty says it "accepts arguments" but I don't see that?)
  • enable http/2 at top server directive
  • gzip responses for text/plain, application/javascript, image/svg+xml at top server directive

Both of these could be be gated by config options, please let me know whether that's necessary.

We are seeing significantly better site usability after manually deploying these changes in a running container.

This answer (and the associated tor browser spec) indicate that HTTP/2 is entirely disabled by design, however in practice both Tor browser and Brave Tor window happily load HTTP/2 resources both via exit nodes and onion services. Whether or not enabling it here constitutes a writer privacy risk for the service is outside of my expertise, however given the target use case of onionspray I don't expect this to be a significant concern.

Merge request reports