Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aws_kinesis sink): fix batching of requests #20575 #1407 #20653

Merged

Conversation

steven-aerts
Copy link
Contributor

Send batches to AWS Kinesis Data Streams and AWS Firehose independent of ther parition keys. In both API's batches of events do not need to share the same partition key.
This makes the protocol more efficient, as by default the partition key is a random key being different for every event.

I validated this commit locally, all unit tests are successful. Relying on CI for integration tests.

@steven-aerts steven-aerts requested a review from a team as a code owner June 12, 2024 12:10
@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Jun 12, 2024
@steven-aerts steven-aerts changed the title fix(aws_kinesis sink): fix batching or requests #20575 #1407 fix(aws_kinesis sink): fix batching of requests #20575 #1407 Jun 12, 2024
Copy link
Member

@lukesteensen lukesteensen left a comment

Choose a reason for hiding this comment

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

This makes sense to me at a high level. Have approved the CI run, and if that's green we should be good to merge.

@steven-aerts
Copy link
Contributor Author

@lukesteensen thank you for the review.

I just added a changelog entry, as the tooling asked me to do so. As I am not confident if this change requires one or not, I requested you if you can have a quick look if this is the correct way of doing things.

Thanks,

Steven

@jszwedko jszwedko enabled auto-merge July 2, 2024 13:28
…ctordotdev#1407

Send batches to AWS Kinesis Data Streams and AWS Firehose independent of
ther parition keys.  In both API's batches of events do not need to
share the same partition key.
This makes the protocol more efficient, as by default the partition key
is a random key being different for every event.
auto-merge was automatically disabled July 2, 2024 14:34

Head branch was pushed to by a user without write access

@lukesteensen lukesteensen added this pull request to the merge queue Jul 2, 2024
Copy link

github-actions bot commented Jul 3, 2024

Regression Detector Results

Run ID: 9f9d428c-57ce-496d-8938-fd7099d78997 Metrics dashboard

Baseline: 1589eb3
Comparison: 0becacb

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

Significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

perf experiment goal Δ mean % Δ mean % CI links
syslog_regex_logs2metric_ddmetrics ingress throughput -5.56 [-5.71, -5.41]
file_to_blackhole egress throughput -8.26 [-15.02, -1.50]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
syslog_log2metric_humio_metrics ingress throughput +1.76 [+1.63, +1.88]
otlp_grpc_to_blackhole ingress throughput +1.40 [+1.29, +1.51]
http_elasticsearch ingress throughput +1.21 [+1.05, +1.37]
datadog_agent_remap_datadog_logs_acks ingress throughput +1.05 [+0.83, +1.27]
datadog_agent_remap_blackhole_acks ingress throughput +0.83 [+0.71, +0.95]
http_text_to_http_json ingress throughput +0.76 [+0.63, +0.89]
http_to_http_acks ingress throughput +0.50 [-0.82, +1.81]
syslog_loki ingress throughput +0.30 [+0.21, +0.39]
http_to_http_noack ingress throughput +0.08 [+0.02, +0.14]
http_to_http_json ingress throughput +0.01 [-0.02, +0.03]
splunk_hec_to_splunk_hec_logs_noack ingress throughput +0.00 [-0.09, +0.10]
splunk_hec_to_splunk_hec_logs_acks ingress throughput +0.00 [-0.10, +0.10]
splunk_hec_route_s3 ingress throughput -0.00 [-0.39, +0.39]
syslog_splunk_hec_logs ingress throughput -0.01 [-0.11, +0.09]
splunk_hec_indexer_ack_blackhole ingress throughput -0.01 [-0.10, +0.08]
http_to_s3 ingress throughput -0.05 [-0.31, +0.21]
socket_to_socket_blackhole ingress throughput -0.33 [-0.39, -0.27]
datadog_agent_remap_datadog_logs ingress throughput -0.51 [-0.73, -0.30]
syslog_log2metric_splunk_hec_metrics ingress throughput -1.20 [-1.33, -1.08]
syslog_humio_logs ingress throughput -1.72 [-1.86, -1.58]
fluent_elasticsearch ingress throughput -2.05 [-2.54, -1.57]
otlp_http_to_blackhole ingress throughput -2.20 [-2.34, -2.07]
datadog_agent_remap_blackhole ingress throughput -3.35 [-3.47, -3.22]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -3.52 [-3.62, -3.42]
syslog_regex_logs2metric_ddmetrics ingress throughput -5.56 [-5.71, -5.41]
file_to_blackhole egress throughput -8.26 [-15.02, -1.50]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2024
@steven-aerts
Copy link
Contributor Author

@lukesteensen this PR got removed from merge queue because of a performance regression in unrelated code.

This feels as a flaky test to me. Would it be possible to try to retrigger?

@lukesteensen lukesteensen added this pull request to the merge queue Jul 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Regression Detector Results

Run ID: 459c4628-7d24-49f3-b03a-38fc00c43bdd Metrics dashboard

Baseline: e1ca0f1
Comparison: 3d8f356

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +6.59 [-0.91, +14.10]
http_text_to_http_json ingress throughput +1.95 [+1.81, +2.09]
syslog_humio_logs ingress throughput +1.91 [+1.77, +2.05]
syslog_regex_logs2metric_ddmetrics ingress throughput +1.65 [+1.52, +1.79]
datadog_agent_remap_blackhole_acks ingress throughput +1.25 [+1.15, +1.35]
fluent_elasticsearch ingress throughput +0.84 [+0.35, +1.33]
syslog_log2metric_humio_metrics ingress throughput +0.76 [+0.62, +0.89]
otlp_grpc_to_blackhole ingress throughput +0.72 [+0.60, +0.84]
http_to_http_acks ingress throughput +0.52 [-0.80, +1.83]
http_to_s3 ingress throughput +0.10 [-0.17, +0.37]
http_to_http_json ingress throughput +0.06 [+0.01, +0.11]
splunk_hec_indexer_ack_blackhole ingress throughput +0.04 [-0.05, +0.12]
http_to_http_noack ingress throughput -0.00 [-0.02, +0.02]
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.00 [-0.10, +0.09]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.01 [-0.12, +0.11]
splunk_hec_route_s3 ingress throughput -0.34 [-0.72, +0.04]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.44 [-0.62, -0.27]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -0.67 [-0.78, -0.56]
syslog_loki ingress throughput -1.47 [-1.55, -1.39]
datadog_agent_remap_blackhole ingress throughput -1.76 [-1.88, -1.65]
socket_to_socket_blackhole ingress throughput -1.99 [-2.07, -1.90]
otlp_http_to_blackhole ingress throughput -2.36 [-2.49, -2.22]
syslog_log2metric_splunk_hec_metrics ingress throughput -2.61 [-2.76, -2.47]
http_elasticsearch ingress throughput -2.72 [-2.89, -2.54]
syslog_splunk_hec_logs ingress throughput -3.00 [-3.10, -2.90]
datadog_agent_remap_datadog_logs ingress throughput -3.03 [-3.23, -2.82]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@lukesteensen lukesteensen added this pull request to the merge queue Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

Regression Detector Results

Run ID: 122b0c39-a13d-4c6e-afba-668d98b22f61 Metrics dashboard

Baseline: 0088883
Comparison: 8834741

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
datadog_agent_remap_datadog_logs ingress throughput +1.38 [+1.23, +1.54]
syslog_log2metric_humio_metrics ingress throughput +0.57 [+0.42, +0.71]
splunk_hec_route_s3 ingress throughput +0.45 [+0.06, +0.84]
http_to_http_json ingress throughput +0.04 [-0.00, +0.09]
http_to_http_noack ingress throughput +0.03 [-0.01, +0.07]
splunk_hec_indexer_ack_blackhole ingress throughput +0.01 [-0.07, +0.09]
splunk_hec_to_splunk_hec_logs_acks ingress throughput +0.00 [-0.12, +0.12]
splunk_hec_to_splunk_hec_logs_noack ingress throughput +0.00 [-0.11, +0.11]
otlp_grpc_to_blackhole ingress throughput -0.01 [-0.13, +0.10]
http_to_http_acks ingress throughput -0.26 [-1.58, +1.05]
syslog_loki ingress throughput -0.33 [-0.42, -0.24]
http_to_s3 ingress throughput -0.39 [-0.66, -0.12]
syslog_regex_logs2metric_ddmetrics ingress throughput -0.50 [-0.65, -0.35]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.60 [-0.79, -0.42]
socket_to_socket_blackhole ingress throughput -0.71 [-0.76, -0.66]
http_text_to_http_json ingress throughput -0.92 [-1.05, -0.79]
syslog_splunk_hec_logs ingress throughput -1.13 [-1.24, -1.03]
syslog_log2metric_splunk_hec_metrics ingress throughput -1.20 [-1.33, -1.07]
datadog_agent_remap_blackhole ingress throughput -1.34 [-1.44, -1.23]
http_elasticsearch ingress throughput -1.34 [-1.51, -1.17]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput -1.49 [-1.60, -1.38]
fluent_elasticsearch ingress throughput -1.56 [-2.04, -1.08]
datadog_agent_remap_blackhole_acks ingress throughput -2.34 [-2.46, -2.22]
otlp_http_to_blackhole ingress throughput -2.80 [-2.93, -2.67]
syslog_humio_logs ingress throughput -2.87 [-2.99, -2.74]
file_to_blackhole egress throughput -4.59 [-11.22, +2.05]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

Merged via the queue into vectordotdev:master with commit 8834741 Jul 3, 2024
49 checks passed
@steven-aerts steven-aerts deleted the batch_kinesis_requests branch July 4, 2024 03:40
ym pushed a commit to ym/vector that referenced this pull request Aug 18, 2024
…ctordotdev#1407 (vectordotdev#20653)

Send batches to AWS Kinesis Data Streams and AWS Firehose independent of
ther parition keys.  In both API's batches of events do not need to
share the same partition key.
This makes the protocol more efficient, as by default the partition key
is a random key being different for every event.
AndrooTheChen pushed a commit to discord/vector that referenced this pull request Sep 23, 2024
…ctordotdev#1407 (vectordotdev#20653)

Send batches to AWS Kinesis Data Streams and AWS Firehose independent of
ther parition keys.  In both API's batches of events do not need to
share the same partition key.
This makes the protocol more efficient, as by default the partition key
is a random key being different for every event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants