Saturday, May 3, 2025

Speed controls

Debounce

Debouncing means to discard operations that occur too close together during a specific interval, and consolidate them into a single invocation.

Debouncing is very similar to throttling. The key difference is that throttling enforces limits on continuous operations, while debouncing waits for invocations to stop for a specific time to consolidate many noisy invocations into one single invocation.

Rate limit

Rate limiting means controlling how many operations can be performed in a given amount of time, usually to avoid overloading the system and causing performance degradation. For example, a server might limit the number of requests it will accept from a single client in a given time period, which not only optimizes the server's overall performance but also mitigates attacks like DoS (denial-of-service).

Rate limiting is typically synonymous with throttling, although debouncing is another viable strategy which provides better semantics and user experience in certain cases.

Throttle

Throttling refers to slowing down a process such that an operation can only be performed at a certain rate.

Throttling is very similar to debouncing. The key difference is that when invocations happen continuously, throttling ensures that the operation is still performed at a certain maximum rate, while debouncing waits indefinitely until the invocations stop for a certain amount of time.

Choke 

Network Choke Point

A point in a computer network through which all or most of the traffic in the network flows. Such points are vulnerable to both crackers and hardware failure. One of the main strategies of network designers is to minimize or eliminate the number of choke points.

Carburetor Choke Value

Choke valves supply a richer fuel mixture when starting the engine by restricting air flow.
source: https://en.wikipedia.org/wiki/Choke_valve

Industrial Fluid Choke Value

In the extraction of petroleum, a choke valve (or "choke") is an adjustable flow limiter that is designed to operate at a large pressure drop, at a large flow rate, for a long time.
source: https://en.wikipedia.org/wiki/Choke_valve

Electronics (Inductor)

In electronics, a choke is an inductor used to block higher-frequency alternating currents (AC) while passing direct current (DC) and lower-frequency ACs in a circuit. The name comes from blocking—"choking"—high frequencies while passing low frequencies.
source: https://en.wikipedia.org/wiki/Choke_(electronics)

Governor

A governor is a mechanical device that automatically maintains the rotary speed of an engine within reasonably close limits regardless of the load. A typical governor regulates an engine’s speed by varying the rate at which fuel is furnished to it.


souce:https://www.britannica.com/technology/governor-machine-component

Exponential Backoff / Retry

The idea behind exponential backoff is to use progressively longer waits between retries for consecutive error responses. Exponential backoff can lead to very long backoff times, because exponential functions grow quickly. You should implement a maximum delay interval and a maximum number of retries. The maximum delay interval and maximum number of retries are not necessarily fixed values. They should be set based on the operation being performed and other local factors, including network latency.

Jitter

Retries can be ineffective if all clients retry at the same time. To avoid this problem, a random amount of time before making or retrying a request is added to help prevent large bursts by spreading out the arrival rate. Most exponential backoff algorithms use jitter to prevent successive collisions. 

source: https://aws.amazon.com/blogs/mt/managing-monitoring-api-throttling-in-workloads/

Circuit breaker

The Circuit Breaker design pattern is commonly used in software development to improve system resilience and fault tolerance. Circuit breaker pattern can prevent cascading failures particularly in distributed systems. The circuit breaker pattern can be used in conjunction with other patterns, such as retry, fallback, and timeout, to enhance fault tolerance in systems.

  • Closed - normal operation
  • Open - returns an error immediately
  • Half-open - a limited number of requests are allowed to pass and the state may change to Closed or Open depending on whether the request succeeds or fails.

source: https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern

See also

Bulkhead isolation

Limits the resources consumable by the governed actions, such that a fault 'storm' cannot cause a cascading failure also bringing down other operations.

bulkhead is a wall within a ship which separates one compartment from another, such that damage to one compartment does not cause the whole ship to sink. Premise: One fault shouldn't bring down the whole ship!

When a process begins to fault, it can build up a large number of requests, all potentially failing slowly in parallel. If unconstrained, these can chew up ever greater resource (CPU, threads, memory, etc.) in the host, degrading capability or eventually causing outright failure.

In a variant, a faulted downstream system can lead to a 'backing up' of large numbers of requests in its consumers. If ungoverned, these 'backed-up' calls can in turn consume all resources in the consumer, leading to a cascading upstream failure.

source: https://github.com/App-vNext/Polly/wiki/Bulkhead


No comments:

Post a Comment