Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

PIP-2675: Disable Batching and Force Global configuration #190

Merged
merged 32 commits into from
Oct 10, 2023

Conversation

Baliedge
Copy link
Contributor

@Baliedge Baliedge commented Sep 28, 2023

https://mailgun.atlassian.net/browse/PIP-2675

  • Batching functionality may be disabled by configuration Behaviors.DisableBatching = true.
    • Frees up some resources, goroutines.
    • Eliminates small delay in each request as batches are assembled and dispatched that may not be beneficial if batch size is typically small.
  • Force global behavior on all rate checks by configuration Behaviors.ForceGlobal = true.
    • Global behavior is unaffected by DisableBatching setting.
  • Change GlobalSyncWait default from 500µs to 500ms to reduce global sync traffic.
  • Remove unnecessary buffer from WorkerPool command channels.
  • Remove extraneous tracing detail.
  • Metric updates
    • WorkerPool metrics:
      • Renamed gubnernator_pool_queue_length to gubernator_worker_queue_length.
      • Added gubernator_command_counter: Counter of commands executed in WorkerPool.
      • Removed gubernator_check_counter.
        • Redundant. Use gubernator_getratelimit_counter{calltype="local"}.
    • Global behavior metrics:
      • Added gubernator_global_queue_length: Size of global broadcast queue.
      • Renamed gubernator_broadcast_durations to gubernator_broadcast_duration.
      • Added gubernator_broadcast_counter: Rate of global broadcasts. Label condition may be timer|queue_full to indicate what triggered the broadcast.
      • Changed gubernator_concurrent_checks_counter from summary to gauge type.
    • Batch behavior metrics:
      • Renamed gubernator_async_durations to gubernator_async_duration.
      • Renamed gubernator_asyncrequest_retries to gubernator_batch_retries.
      • Renamed gubernator_queue_length to gubernator_batch_queue_length.
        • Changed from summary to gauge type.

@Baliedge Baliedge requested a review from a team September 28, 2023 13:57
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from 86db0cc to 66e8943 Compare September 29, 2023 19:43
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from 9027f13 to 56d48ce Compare October 2, 2023 15:36
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from 56d48ce to 2573caf Compare October 2, 2023 17:10
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from 5123ddb to d7bc3a9 Compare October 2, 2023 17:57
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from a31519d to 01f0441 Compare October 3, 2023 19:26
@Baliedge Baliedge marked this pull request as ready for review October 10, 2023 13:32
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from f1c6bc2 to 69f7e5a Compare October 10, 2023 14:54
@Baliedge Baliedge changed the title PIP-2675: Disable batching PIP-2675: Disable Batching and Force Global configuration Oct 10, 2023
Copy link
Contributor

@thrawn01 thrawn01 left a comment

Choose a reason for hiding this comment

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

A few nit picks, but looks good!

config.go Outdated Show resolved Hide resolved
algorithms.go Outdated Show resolved Hide resolved
gubernator.go Show resolved Hide resolved
@Baliedge Baliedge force-pushed the Baliedge/PIP-2675-disable-batching branch from da2120a to 2d57822 Compare October 10, 2023 19:03
@Baliedge Baliedge merged commit d6d8f17 into master Oct 10, 2023
0 of 2 checks passed
@Baliedge Baliedge deleted the Baliedge/PIP-2675-disable-batching branch October 10, 2023 19:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants