Activate HTTP/2 to enhance Splunk Web performance
Activate HTTP/2 for Splunk Web to improve page load performance, support parallel browsing activity, and provide more efficient, secure handling of web traffic.
The HTTP/2 protocol uses multiplexed communication between Splunk Web and splunkd to handle browsing activity in parallel, rather than sequentially, like HTTP/1.1. This significantly enhances web performance, especially when you manage multiple browser tabs, complex dashboards, and simultaneous searches or pivots.
-
Faster page loads for workflows that trigger multiple simultaneous requests.
-
More efficient handling of parallel requests with less waiting during heavy parallel interaction.
- Improved security.
HTTP/2 binary and logs
Splunk Enterprise uses the nghttpx proxy service to handle the HTTP/2 protocol. The nghttpx proxy service starts and stops with splunkd.
You can find the binaries and log files in the following folders:
- Binary: $SPLUNK_HOME/bin/nghttpx/
-
Proxy logs: $SPLUNK_HOME/var/log/nghttpx/
These logs are automatically ingested into the _internal index for system health monitoring.
Prerequisites
Before activating the HTTP/2 protocol, ensure your environment meets the following requirements:
-
Supported operating systems: Linux and macOS.
The HTTP/2 protocol is not supported on Windows.
- Ensure Secure Sockets Layer (SSL) / Transport Layer Security (TLS) is turned on for Splunk Web. The HTTP/2 proxy (
nghttpx) requires a valid certificate to start. -
By default, the service uses the existing Splunk Web certificate and
private key.If you need to use specific certificates, you can override the defaults using the
privKeyPathandserverCertsettings within the configuration stanza.
Activate HTTP/2
The HTTP/2 protocol is deactivated by default (auto_start = false). To activate HTTP/2, follow these steps:
- Open or create a local web.conf file in $SPLUNK_HOME/etc/system/local/.
- Add the following stanza and settings:
Note:
The
httpportport must support HTTPS.CODE[nghttpx_server] auto_start = true httpport = 9000 workers = 1 backendConnectionsPerFrontend = 0 - Restart splunkd for the changes to take effect.
-
Confirm the
nghttpxprocess is running on your host. -
Check the log file for successful initialization messages in the $SPLUNK_HOME/var/log/nghttpx/ folder.
Troubleshoot HTTP/2 issues with logs
If you encounter issues with Splunk Web connectivity after activating HTTP/2, refer to the log file for the the nghttpx proxy service in the $SPLUNK_HOME/var/log/nghttpx/ folder.
index=_internal sourcetype="nghttpx"
The common HTTP/2 errors may include:
-
Proxy fails to start
Cause: Usually, an invalid or missing SSL certificate.
Solution: Ensure Splunk Web SSL is properly configured.
-
Port conflicts
Cause: Another service is using the port assigned to the
nghttpxproxy service.Solution: Update the
httpportsetting in the[nghttpx_server]stanza to an unused port.
Deactivate HTTP/2 and revert to HTTP/1.1
The process of deactivating the HTTP/2 protocol and reverting to HTTP/1.1 is immediate and does not result in data loss.
Take the following steps:
- Open your
web.conffile. - In the
[nghttpx_server]stanza, setauto_start = falseor remove the stanza entirely. - Restart
splunkd.
Traffic will immediately return to using HTTP/1.1. There is no residual state or temporary data that requires cleaning up.