mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Disable bfetch in serverless (#183096)
## Summary Part of https://github.com/elastic/kibana/issues/181938. Disables bfetch in serverless by overriding the `bfetch:disable` advanced setting in the serverless.yml. Bfetch was introduced to bypass the browser connection limit when multiple search requests are made. Here's a picture of what the network tab looks like with bfetch turned off in http1:  As the number of requests reaches the connection limit (6 on most modern browsers), requests stall until a connection is available. In Cloud/serverless, we have a http2 proxy. Http2 does not have this browser connection limit. Turning off bfetch allows us to collect metrics to decide if we want to remove it altogether: | Bfetch enabled | Bfetch disabled (this PR) | | --------------- | ------------------------- | |  |  | In my tests, the overall time for a sample dashboard to load was actually smaller with bfetch disabled on http2 vs. bfetch enabled. ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
This commit is contained in:
parent
4c5afdfc52
commit
37215fbb00
3 changed files with 16 additions and 13 deletions
|
@ -141,6 +141,7 @@ uiSettings:
|
|||
overrides:
|
||||
# Disables ESQL in advanced settings (hides it from the UI)
|
||||
enableESQL: true
|
||||
bfetch:disable: true
|
||||
# Disables `Defer loading panels below "the fold"`
|
||||
labs:dashboard:deferBelowFold: false
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
);
|
||||
await kibanaServer.uiSettings.replace({
|
||||
defaultIndex: 'logstash-*',
|
||||
'bfetch:disable': true,
|
||||
// 'bfetch:disable': true, // bfetch is already disabled in serverless
|
||||
// TODO: Removed ES|QL setting since ES|QL isn't supported in Serverless
|
||||
});
|
||||
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
|
||||
|
|
|
@ -20,20 +20,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await PageObjects.svlCommonPage.loginAsAdmin();
|
||||
});
|
||||
|
||||
describe('with bfetch', () => {
|
||||
testSearchExample();
|
||||
});
|
||||
// bfetch is disabled in serverless
|
||||
// describe('with bfetch', () => {
|
||||
// testSearchExample();
|
||||
// });
|
||||
|
||||
describe('no bfetch', () => {
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
before(async () => {
|
||||
await kibanaServer.uiSettings.replace({
|
||||
'bfetch:disable': true,
|
||||
});
|
||||
});
|
||||
after(async () => {
|
||||
await kibanaServer.uiSettings.unset('bfetch:disable');
|
||||
});
|
||||
// No need to disable since it is disabled in serverless.yml
|
||||
// const kibanaServer = getService('kibanaServer');
|
||||
// before(async () => {
|
||||
// await kibanaServer.uiSettings.replace({
|
||||
// 'bfetch:disable': true,
|
||||
// });
|
||||
// });
|
||||
// after(async () => {
|
||||
// await kibanaServer.uiSettings.unset('bfetch:disable');
|
||||
// });
|
||||
|
||||
testSearchExample();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue