Add multiple beat.Clients
Proposed commit message
Improve GCP PubSub input performance by creating multiple beat.Clients in a pool for each pubsub input instance. Each client creates its own subscription to the topic.
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have made corresponding change to the default configuration files
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added an entry in
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.
Author's Checklist
- [ ]
How to test this PR locally
Related issues
- Closes https://github.com/elastic/beats/issues/35029
Use cases
Screenshots
Logs
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @kcreddy? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-v8./d.0is the label to automatically backport to the8./dbranch./dis the digit
:green_heart: Build Succeeded
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
-
Start Time: 2024-01-17T10:34:11.450+0000
-
Duration: 136 min 1 sec
Test stats :test_tube:
| Test | Results |
|---|---|
| Failed | 0 |
| Passed | 3243 |
| Skipped | 176 |
| Total | 3419 |
:green_heart: Flaky test report
Tests succeeded.
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test: Re-trigger the build. -
/package: Generate the packages and run the E2E tests. -
/beats-tester: Run the installation tests with beats-tester. -
runelasticsearch-ci/docs: Re-trigger the docs validation. (use unformatted text in the comment!)
:grey_exclamation: Build Aborted
There is a new build on-going so the previous on-going builds have been aborted.
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
-
Start Time: 2024-01-19T15:17:40.686+0000
-
Duration: 6 min 44 sec
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test: Re-trigger the build. -
/package: Generate the packages and run the E2E tests. -
/beats-tester: Run the installation tests with beats-tester. -
runelasticsearch-ci/docs: Re-trigger the docs validation. (use unformatted text in the comment!)
:green_heart: Build Succeeded
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
- Duration: 137 min 43 sec
:grey_exclamation: Flaky test report
No test was executed to be analysed.
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test: Re-trigger the build. -
/package: Generate the packages and run the E2E tests. -
/beats-tester: Run the installation tests with beats-tester. -
runelasticsearch-ci/docs: Re-trigger the docs validation. (use unformatted text in the comment!)
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @kcreddy? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-v8./d.0is the label to automatically backport to the8./dbranch./dis the digit
:broken_heart: Build Failed
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
Failed CI Steps
cc @kcreddy
:broken_heart: Build Failed
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
Failed CI Steps
cc @kcreddy
:broken_heart: Build Failed
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
Failed CI Steps
cc @kcreddy
:green_heart: Build Succeeded
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
cc @kcreddy
:green_heart: Build Succeeded
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
cc @kcreddy
:green_heart: Build Succeeded
- Buildkite Build
- Commit: e5c4e55d2983a6c3ec75677cee5e79441bf30cb6
cc @kcreddy
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b gcppubsub-improv upstream/gcppubsub-improv
git merge upstream/main
git push upstream gcppubsub-improv
This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/
git fetch upstream
git checkout -b gcppubsub-improv upstream/gcppubsub-improv
git merge upstream/main
git push upstream gcppubsub-improv
Closing the PR as per the comments: https://github.com/elastic/beats/pull/37657#pullrequestreview-2001340301.
This PR aims at creating multiple pubsub clients and not the beat pipeline clients. Although there is performance benefits observed, it is only because of the additional go_routines being created underneath. This is verified by increasing existing config options alone and we don't require additional pubsub clients to get this performance benefit.
The input blockage issue is resolved by increasing the default value of max_outstanding_messages in https://github.com/elastic/beats/pull/38985.