Skip to main content
Version: 2.7.0

Load Ramp

The Load Ramp is a high-level component in the policy circuit. It is specifically designed to facilitate controlled traffic ramp-up scenarios. This component allows for gradual increases in traffic by specifying rollout steps, each defined by a time duration and target percentage. The target percentage transitions linearly from one step to the next.

To achieve this functionality, the Load Ramp utilizes input ports named forward, backward, and reset to control its behavior. These input signals drive the internal logic of the component. Additionally, the Load Ramp internally leverages the Sampler component, providing it with an accept_percentage signal.

Sampler

The Sampler component in Aperture is designed to manage the load at a Control Point by allowing only a specified percentage of flows at random or by sticky sessions. Sampler is useful for ramping the load in a controlled way.

The following example creates a Sampler at the ingress control point of user-service.default.svc.cluster.local service. It accepts 50% of the flows with stickiness based on the value of http.request.header.user_id flow label:

circuit:
components:
- flow_control:
sampler:
in_ports:
accept_percentage:
constant_signal:
value: 50
parameters:
label_key: http.request.header.user_id
selectors:
- control_point: ingress
service: user-service.default.svc.cluster.local

Stateless Filter

When the label key is not specified, the Sampler acts as a stateless filter. In this mode, it selects a percentage of flows randomly. This is useful for controlling the overall load at a control point without focusing on specific sessions or users.

Sticky Filter

If a label key is specified, the Sampler acts as a sticky filter. In this mode, it ensures that a series of flows with the same value of the label key get the same decision, provided the accept percentage remains the same or higher. This is useful for maintaining consistent behavior for specific sessions or users.

Dynamic Configuration

The Sampler supports dynamic configuration by specifying certain label values to be accepted by the flow filter, regardless of the accept percentage. This enables making exceptions for specific sessions or users, granting them unhindered access to a control point.

Selector

The Flow Selector is responsible for determining the service and flows at which the Sampler is applied. By configuring the Flow Selector, one can control which parts of a service are affected by the Sampler.

Accept Percentage Signal

The Sampler component takes an accept-percentage input signal, based on which it decides the percentage of flows to accept, allowing for a fine-grained control.