Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 995 Bytes

File metadata and controls

31 lines (23 loc) · 995 Bytes

Adaptive Concurrency Control Library

This Rust library provides adaptive concurrency control for network services, implementing an algorithm that automatically adjusts the maximum number of concurrent requests based on observed response times and backpressure signals.

Features

  • Adaptive concurrency limiting based on RTT measurements
  • Automatic scaling of concurrency limits
  • Integration with Reqwest for HTTP services
  • Configurable parameters for fine-tuning behavior
  • Support for retry logic and backpressure detection

Example Usage with OpenAI API

To run the OpenAI example:

  1. Set your Kluster AI API key:
export OPENAI_API_KEY='your-klusterai-api-key'
  1. Build and run the example:
cargo run --example openai_arc

The example demonstrates:

  • Setting up an adaptive concurrency client for OpenAI API
  • Configuring initial and max concurrency limits
  • Sending multiple requests concurrently
  • Handling responses with adaptive backpressure control