cube icon indicating copy to clipboard operation
cube copied to clipboard

feat(server): Add server config for headers and keep alive timeouts

Open marianore-muttdata opened this issue 10 months ago • 2 comments

Check List

  • [x] Tests have been run in packages where changes made if available
  • [x] Linter has been run for changed code
  • [x] Docs have been added / updated if required
  • [ ] Tests for the changes have been added if not covered yet

Description of Changes Made

This is a change that we've been using in our application to sync the timeouts with the LoadBalancer correctly.

Added two new environment variables to configure HTTP server options:

  • CUBEJS_SERVER_HEADERS_TIMEOUT
  • CUBEJS_SERVER_KEEP_ALIVE_TIMEOUT

Each default to the default values in the Server class found in the HTTP Node module.

marianore-muttdata avatar Mar 06 '25 16:03 marianore-muttdata

Hi @KSDaemon! Do you think this feature could be added anytime soon? Do you see any utility? We're actually using it productively ;)

marianore-muttdata avatar Jun 13 '25 11:06 marianore-muttdata

Hey @marianore-muttdata looks good. Could you please rebase it on top of the latest master branch? GitHub shows that there are some conflicts. Thnx!

KSDaemon avatar Jun 13 '25 14:06 KSDaemon

Hey @marianore-muttdata! Actually... The tests are failing because of:

    Error: Invalid cube-server-core options: "serverHeadersTimeout" is not 
      allowed. "serverKeepAliveTimeout" is not allowed

We forgot to update the options scheme here

KSDaemon avatar Jun 18 '25 12:06 KSDaemon

Hey @marianore-muttdata! Actually... The tests are failing because of:

    Error: Invalid cube-server-core options: "serverHeadersTimeout" is not 
      allowed. "serverKeepAliveTimeout" is not allowed

We forgot to update the options scheme here

Got it! Let me know if there's anything else that you'd write differently.

marianore-muttdata avatar Jun 18 '25 14:06 marianore-muttdata

I think now everything is fine! :) Let's merge!

KSDaemon avatar Jun 18 '25 14:06 KSDaemon