beats icon indicating copy to clipboard operation
beats copied to clipboard

Add multiple beat.Clients

Open kcreddy opened this issue 1 year ago • 11 comments

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.asciidoc or CHANGELOG-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

kcreddy avatar Jan 17 '24 10:01 kcreddy

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.0 is the label to automatically backport to the 8./d branch. /d is the digit

mergify[bot] avatar Jan 17 '24 10:01 mergify[bot]

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview preview

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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 17 '24 12:01 elasticmachine

: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 Pipeline View Test View Changes Artifacts preview

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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 19 '24 15:01 elasticmachine

:green_heart: Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview preview

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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

elasticmachine avatar Jan 19 '24 17:01 elasticmachine

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.0 is the label to automatically backport to the 8./d branch. /d is the digit

mergify[bot] avatar Feb 05 '24 15:02 mergify[bot]

:broken_heart: Build Failed

Failed CI Steps

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

:broken_heart: Build Failed

Failed CI Steps

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

:broken_heart: Build Failed

Failed CI Steps

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

:green_heart: Build Succeeded

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

:green_heart: Build Succeeded

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

:green_heart: Build Succeeded

cc @kcreddy

elasticmachine avatar Mar 05 '24 15:03 elasticmachine

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

elasticmachine avatar Apr 10 '24 12:04 elasticmachine

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

mergify[bot] avatar Apr 15 '24 05:04 mergify[bot]

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

mergify[bot] avatar Apr 16 '24 18:04 mergify[bot]

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.

kcreddy avatar Apr 17 '24 06:04 kcreddy