SkillAgentSearch skills...

Aperture

Rate limiting, caching, and request prioritization for modern workloads

Install / Use

/learn @fluxninja/Aperture

README

<!-- vale off --> <!-- markdownlint-disable --> <p align="center"> <img src="docs/content/assets/img/aperture_logo.png" alt="FluxNinja Aperture" width="75%"> <br/> <a href="https://docs.fluxninja.com"> <img alt="Documentation Reference" src="https://img.shields.io/badge/documentation-reference-brightgreen?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH5gkaEAsvan7AVwAAB5FJREFUWMPtmFtsHOUVgL/zz+zFe/Oud23n4thOQgJJsXOnBEUoKlHoLVABKn0CVe0DVdUKVWqf2qilV4SqSkhVhaq+0NJGpQq9ASWlkQoEGpqQC5ALJMGOndjxbdf27nq9O/OfPswmaYPtBEFbIfmMRjvSzJz5/nP5zzkL8zIv8/LhFvkglOTHRkE1qiIrARHVtxCZyjRl37du8wHBNajId0T1eVH7NxV5BNVUfmz0/2vB/NgoGqi5S/za4+7+3XGsj3fzPRV1w18EfUKA92NJ95qtFCzGRTWuIkmgUUUWI2YzcL85cyTu7n8KrI9t7oz6q7b8EFilaveNjY32AeOiOolICfAAvRbwOS1Yd5+rIl0Y53aQjaDtqDaJ9VJ4taSU8lHzzmHc/buR8WEQ0EQT3kfvwi5bj8Yz04TCk2qcccTkQfpBD2D950T1CCK1uUDlKnBJFfM1UfslGR9qleFepDCIFMeQUgGZGMEUBpCJETSawNt0Bzgu7qu/R8rjaDKHzSxEUzk0noFEBptegOba0XTrsIrzC1H7MCKF2SBlNjgNbn1DquXvuwf+7DpH/4qMDyHWosYBx4VILIBYtBJ/1RZs2ypAkPMncU/sw/QfRyaGYboMvoeoj4pBkzn87m14N91pNRx7S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X3qrSLRk~g"> <img alt="Slack Community" src="https://img.shields.io/badge/Join%20Our%20Community-Slack-brightgreen?style=for-the-badge&logo=slack"> </a> <a href="https://dl.circleci.com/status-badge/img/gh/fluxninja/aperture/tree/main.svg?style=svg"> <img alt="Build Status" src="https://img.shields.io/circleci/build/github/fluxninja/aperture/main?style=for-the-badge&logo=circleci"> </a> <a href="https://goreportcard.com/report/github.com/fluxninja/aperture"> <img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/fluxninja/aperture?style=for-the-badge"> </a> <a href="https://pkg.go.dev/github.com/fluxninja/aperture"> <img alt="Godoc Reference" src="https://img.shields.io/badge/godoc-reference-brightgreen?style=for-the-badge&logo=go&logoColor=white"> </a> </p> <!-- markdownlint-enable --> <!-- vale on -->

🥷 FluxNinja Aperture

Aperture is a distributed load management platform designed for rate limiting, caching, and prioritizing requests in cloud applications. Built upon a foundation of distributed counters, observability, and a global control plane, it provides a comprehensive suite of load management capabilities. These capabilities enhance the reliability and performance of cloud applications, while also optimizing cost and resource utilization.

Unified Load Management Unified Load Management

Integrating Aperture in your application through SDKs is a simple 3-step process:

  • Define labels: Define labels to identify users, entities, or features within your application. For example, you can define labels to identify individual users, features, or API endpoints.
<!-- vale off --> <!-- markdownlint-disable --> <details> <summary>Example</summary>
// Tailor policies to get deeper insights into your workload with labels that
// capture business context.
const labels = {
  // You can rate limit each user individually.
  user: "jack",
  // And have different rate limits for different tiers of users.
  tier: "premium",
  // You can also provide the tokens for each request.
  // Tokens are flexible: LLM AI tokens in a prompt, complexity of a request,
  // number of sub-actions, etc.
  tokens: "200",
  // When peak load exceeds external quotas or infrastructure capacity,
  // requests can be throttled and prioritized.
  priority: HIGH,
  // Get deep insights into your workload. You can slice and dice performance
  // metrics by any label.
  workload: "/chat",
};
<!-- markdownlint-enable --> <!-- vale on --> </details>
  • Wrap your workload: Wrap your workload with startFlow and endFlow calls to establish control points around specific features or code sections inside your application. For example, you can wrap your API endpoints with Aperture SDKs to limit the number of requests per user or feature.
<!-- vale off --> <!-- markdownlint-disable --> <details> <summary>Example</summary>
// Wrap your workload with startFlow and endFlow calls, passing in the
// labels you defined earlier.
const flow = await apertureClient.startFlow("your_workload", {
  labels: labels,
  // Lookup result cache key to retrieve a cached result.
  resultCacheKey: queryParams,
});

// If rate or quota limit is not exceeded, the workload is executed.
if (flow.shouldRun()) {
  // Return a cached result or execute the workload.
  const cachedResult = flow.resultCache();
  const result = await yourWorkload(cachedResult);
  flow.setResultCache({
    value: result,
    ttl: { seconds: 86400, nanos: 0 },
  });
}
//
</details> <!-- markdownlint-enable --> <!-- vale on -->
  • Configure & monitor policies: Configure policies to control the rate, concurrency, and priority of requests.
<!-- vale off --> <!-- markdownlint-disable --> <details> <summary>Policy YAML</summary>
blueprint: rate-limiting/base
uri: github.com/fluxninja/aperture/blueprints@latest
policy:
  policy_name: rate_limit
  rate_limiter:
    bucket_capacity: 60
    fill_amount: 60
    parameters:
      interval: 3600s
      limit_by_label_key: user
    selectors:
      - control_point: your_workload
        label_matcher:
          match_list:
            - key: tier
              operator: In
              values:
                - premium
</details> <!-- markdownlint-enable --> <!-- vale on -->

Rate Limiter Blueprint Rate Limiter Blueprint Rate Limiter Dashboard Rate Limiter Dashboard

In addition to language SDKs, Aperture also integrates with existing control points such as API gateways, service meshes, and application middlewares.

⚙️ Load management capabilities

  • ⏱️ Global Rate and Concurrency Limiting: Safeguard APIs and features against excessive usage with Aperture's high-performance, distributed rate limiter. Identify individual users or entities by fine-grained labels. Create precise rate limiters controlling burst-capacity and fill-rate tailored to business-specific labels. Limit per user or global concurrency of in-flight requests. Refer to the Rate Limiting and Concurrency Limiting guides for more details.
  • 📊 API Quota Management: Maintain compliance with external API quotas with a global token bucket and smart request queuing. This feature regulates requests aimed at external services, ensuring that the usage remains within prescribed rate limits and avoids penalties or additional costs. Refer to the API Quota Management guide for more details.
  • 🚦 Concurrency Control and Prioritization: Safeguard against abrupt service overloads by limiting the number of concurrent in-flight requests. Any requests beyond

Related Skills

View on GitHub
GitHub Stars728
CategoryDevelopment
Updated8d ago
Forks35

Languages

Go

Security Score

100/100

Audited on Mar 21, 2026

No findings