Skip to content

Enable http2 in kibana#1879

Merged
jsoriano merged 3 commits into
elastic:mainfrom
jsoriano:kibana-http2
Jun 4, 2024
Merged

Enable http2 in kibana#1879
jsoriano merged 3 commits into
elastic:mainfrom
jsoriano:kibana-http2

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Jun 3, 2024

Kibana 8.15.0 will have support for HTTP2 (after elastic/kibana#183465). Let's use it in local stacks managed by elastic-package.

Or should we wait till this is closer to GA?

@jsoriano jsoriano requested a review from a team June 3, 2024 12:57
@jsoriano jsoriano self-assigned this Jun 3, 2024
@jsoriano jsoriano marked this pull request as draft June 3, 2024 13:11
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 3, 2024

Moving to draft till this is available in snapshots.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Jun 4, 2024

This is great! It will help us to test http2 much more.

@jsoriano jsoriano marked this pull request as ready for review June 4, 2024 12:25
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 4, 2024

Snapshots already have the flag, opening for review.

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out the branch and did spin up the cluster quickly, clicking around. Looks good to me. How do I confirm that http2 is enabled? Is there some indicator or similar?

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 4, 2024

How do I confirm that http2 is enabled? Is there some indicator or similar?

In Kibana itself no idea, but you can check with curl.

Before this change:

$ curl -v -k https://localhost:5601/api
*   Trying 127.0.0.1:5601...
* Connected to localhost (127.0.0.1) port 5601 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
...
* ALPN, server accepted to use http/1.1
...
> GET /api HTTP/1.1

After this change:

$ curl -v -k https://localhost:5601/api
*   Trying 127.0.0.1:5601...
* Connected to localhost (127.0.0.1) port 5601 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
...
* ALPN, server accepted to use h2
...
> GET /api HTTP/2

In the browser developer tools it is also possible to see the HTTP/2 version for any of the requests done.

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Jun 4, 2024

Checking with curl confirms things are working as expected 👍

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 4, 2024

@kpollich @mrodm wdyt about merging this?

@mrodm
Copy link
Copy Markdown
Contributor

mrodm commented Jun 4, 2024

@kpollich @mrodm wdyt about merging this?

This will enable HTTP/2 always starting with 8.15.0-SNAPSHOT, would it be good to have some setting in the stack configuration to disable this (going back to HTTP/1.1)? Similar to the self_monitor_enabled setting ?

configSelfMonitorEnabled = "stack.self_monitor_enabled"

Thinking in case it is needed to test both scenarios. Would that be needed?

@kpollich
Copy link
Copy Markdown
Member

kpollich commented Jun 4, 2024

This will enable HTTP/2 always starting with 8.15.0-SNAPSHOT, would it be good to have some setting in the stack configuration to disable this (going back to HTTP/1.1)? Similar to the self_monitor_enabled setting ?

+1 on having a setting to disable this as a potential troubleshooting mechanism. Otherwise I'm good with merging this.

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 4, 2024

This will enable HTTP/2 always starting with 8.15.0-SNAPSHOT

Correct.

would it be good to have some setting in the stack configuration to disable this (going back to HTTP/1.1)? Similar to the self_monitor_enabled setting ?

We could, but I don't think it would be needed. If we add a setting, I would add it as escape hatch to disable http2 if found problematic, but I would keep using http2 when possible by default. But if we find problems with http2 we might also consider reverting this change. I would leave this for a future change, if we find we need it for some reason.

Thinking in case it is needed to test both scenarios. Would that be needed?

I don't think so. This only changes the transport, nothing functional should change.

@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jun 4, 2024

+1 on having a setting to disable this as a potential troubleshooting mechanism.

Ok, added flag as potential troubleshooting mechanism.

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

cc @jsoriano

Copy link
Copy Markdown
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jsoriano jsoriano merged commit 5ab8491 into elastic:main Jun 4, 2024
@jsoriano jsoriano deleted the kibana-http2 branch June 4, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants