How do I run Deephaven behind an AWS Application Load Balancer?
I'm running Deephaven behind an AWS Application Load Balancer (ALB) on Kubernetes. When I try to access the IDE, I get an HTTP 500 error with a NullPointerException mentioning "host" is null. How do I fix this?
This error typically occurs when the ALB does not forward the X-Forwarded-Host header, which Jetty's ForwardedRequestCustomizer expects. The error looks like:
Root cause
AWS ALB sends X-Forwarded-For but historically has not sent a spec-compliant X-Forwarded-Host header. Deephaven's embedded Jetty server uses ForwardedRequestCustomizer to process these headers, and it expects either a valid X-Forwarded-Host or a complete, spec-compliant X-Forwarded-For value.
Additionally, ALB defaults to HTTP/1.1 for backend connections. Deephaven requires HTTP/2 for gRPC communication.
Solution: Use an nginx sidecar
The recommended solution is to deploy an nginx sidecar container that sits between ALB and Deephaven. The nginx proxy handles the forwarded headers and protocol translation properly.
Why this works
- Header normalization: nginx can add the missing
X-Forwarded-Hostheader. - Protocol handling: nginx can terminate HTTP/1.1 from ALB and forward HTTP/2 to Deephaven.
- Proven pattern: This mirrors how Deephaven Enterprise uses Envoy in production with ALB.
ALB configuration notes
If you're configuring ALB directly (without a sidecar), ensure you're using the correct backend protocol. For gRPC-based applications like Deephaven, you need:
Not:
See the AWS documentation on gRPC with ALB for more details.
Related configuration
The proxy.hint property in deephaven.prop controls some internal configuration choices:
- Whether HTTP/1.1 should ever be supported.
- Whether WebSocket support should be enabled.
When a proxy is present, proxy.hint=true tells Deephaven to disable HTTP/1.1 and WebSocket support, since the proxy handles TLS and forwards h2 or h2c connections.
Related documentation
Note
These FAQ pages contain answers to questions about Deephaven Community Core that our users have asked in our Community Slack. If you have a question that is not in our documentation, join our Community and we'll be happy to help!