Rate Limiter¶
Class: RateLimiterBlockV1
Source: inference.core.workflows.core_steps.flow_control.rate_limiter.v1.RateLimiterBlockV1
The Rate Limiter block controls the execution frequency of a branch within a Workflow by enforcing a cooldown period. It ensures that the connected steps do not run more frequently than a specified interval, helping to manage resource usage and prevent over-execution.
Block usage¶
Rate Limiter is useful when you have two blocks that are directly connected, as shown below:
--- input_a --> ┌───────────┐ ┌───────────┐ --- input_b --> │ step_1 │ --> output_a --> │ step_2 │ --- input_c --> └───────────┘ └───────────┘
If you want to throttle the Step 2 execution rate - you should apply rate limiter in between:
-
keep the existing blocks configuration as is (do not change connections)
-
set
depends_on
reference of Rate Limiter intooutput_a
-
set
next_steps
reference to be a list referring to[$steps.step_2]
-
adjust
cooldown_seconds
to specify what is the number of seconds that must be awaited before next time whenstep_2
is fired
Cooldown limitations
Current implementation of cooldown is limited to video processing - using this block in context of a
Workflow that is run behind HTTP service (Roboflow Hosted API, Dedicated Deployment or self-hosted
inference
server) will have no effect for processing HTTP requests.
Type identifier¶
Use the following identifier in step "type"
field: roboflow_core/rate_limiter@v1
to add the block as
as step in your workflow.
Properties¶
Name | Type | Description | Refs |
---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
cooldown_seconds |
float |
The minimum number of seconds between allowed executions.. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow
runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to Rate Limiter
in version v1
.
- inputs:
Rate Limiter
,Identify Changes
,Reference Path Visualization
,Florence-2 Model
,Triangle Visualization
,Stitch OCR Detections
,Continue If
,Property Definition
,Florence-2 Model
,Circle Visualization
,Keypoint Detection Model
,Dot Visualization
,Mask Visualization
,Multi-Label Classification Model
,Stability AI Image Generation
,Polygon Zone Visualization
,Velocity
,SIFT Comparison
,Stitch Images
,LMM For Classification
,Classification Label Visualization
,VLM as Detector
,Background Color Visualization
,Byte Tracker
,Data Aggregator
,Camera Focus
,Dimension Collapse
,Local File Sink
,Image Convert Grayscale
,Color Visualization
,Single-Label Classification Model
,Detections Transformation
,Expression
,Google Gemini
,Dynamic Zone
,Gaze Detection
,Pixelate Visualization
,Perspective Correction
,Clip Comparison
,Image Preprocessing
,Trace Visualization
,Cosine Similarity
,Absolute Static Crop
,Corner Visualization
,VLM as Classifier
,Stability AI Inpainting
,Path Deviation
,Keypoint Detection Model
,Detection Offset
,Template Matching
,VLM as Classifier
,Identify Outliers
,Environment Secrets Store
,Halo Visualization
,Roboflow Custom Metadata
,Keypoint Visualization
,SIFT
,CSV Formatter
,Webhook Sink
,SIFT Comparison
,Label Visualization
,Image Contours
,Single-Label Classification Model
,Line Counter
,Image Threshold
,Time in Zone
,Twilio SMS Notification
,Detections Consensus
,Line Counter Visualization
,Byte Tracker
,Polygon Visualization
,Instance Segmentation Model
,Object Detection Model
,Time in Zone
,Detections Filter
,Grid Visualization
,VLM as Detector
,Bounding Box Visualization
,Bounding Rectangle
,Buffer
,Size Measurement
,OpenAI
,Object Detection Model
,Roboflow Dataset Upload
,Model Comparison Visualization
,Cache Set
,Ellipse Visualization
,Clip Comparison
,Detections Stitch
,Instance Segmentation Model
,Slack Notification
,YOLO-World Model
,Pixel Color Count
,CLIP Embedding Model
,JSON Parser
,Relative Static Crop
,Crop Visualization
,Image Blur
,Email Notification
,LMM
,Google Vision OCR
,Barcode Detection
,Anthropic Claude
,CogVLM
,Llama 3.2 Vision
,Multi-Label Classification Model
,Detections Classes Replacement
,QR Code Detection
,Distance Measurement
,Model Monitoring Inference Aggregator
,Segment Anything 2 Model
,Dynamic Crop
,Line Counter
,Detections Stabilizer
,OCR Model
,Image Slicer
,First Non Empty Or Default
,Path Deviation
,OpenAI
,Cache Get
,Roboflow Dataset Upload
,Byte Tracker
,Dominant Color
,Blur Visualization
,Delta Filter
- outputs: None
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
Rate Limiter
in version v1
has.
Bindings
-
input
depends_on
(*
): Reference to any output of the the step which immediately preceeds this branch..next_steps
(step): Reference to steps which shall be executed if rate limit allows..video_reference_image
(image
): Reference to a video frame to use for timestamp generation (if running faster than realtime on recorded video)..
-
output
Example JSON definition of step Rate Limiter
in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/rate_limiter@v1",
"cooldown_seconds": 1.0,
"depends_on": "$steps.model",
"next_steps": [
"$steps.upload"
],
"video_reference_image": "$inputs.image"
}