# @comunica/actor-http-limit-rate

> Comunica HTTP bus actor that performs rate limiting

Latest version **5.4.0** (published 2026-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @comunica/actor-http-limit-rate
pnpm add @comunica/actor-http-limit-rate
yarn add @comunica/actor-http-limit-rate
bun add @comunica/actor-http-limit-rate
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.4.0 |
| Published | 2026-09-14 |
| First published | 2025-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 41.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 580 |
| Maintainers | joachimvh, rubensworks, rubenverborgh, dexagod, jeswr |
| Keywords | comunica, runner |

## Links

- npm: https://www.npmjs.com/package/@comunica/actor-http-limit-rate
- Repository: https://github.com/comunica/comunica
- Homepage: https://comunica.dev/
- Issues: https://github.com/comunica/comunica/issues
- npm.io page: https://npm.io/package/@comunica/actor-http-limit-rate

## Dependencies (4)

- [@comunica/core](https://npm.io/package/@comunica/core.md) ^5.4.0
- [@comunica/bus-http](https://npm.io/package/@comunica/bus-http.md) ^5.4.0
- [@comunica/mediatortype-time](https://npm.io/package/@comunica/mediatortype-time.md) ^5.4.0
- [@comunica/bus-http-invalidate](https://npm.io/package/@comunica/bus-http-invalidate.md) ^5.4.0

## Recent versions

- 5.4.0 (latest) — 2026-09-14
- 4.4.2-alpha.49.0 (next) — 2025-10-22
- 5.3.0 — 2026-07-10
- 5.2.3 — 2026-05-26
- 5.2.2 — 2026-05-03
- 5.2.0 — 2026-04-14
- 5.1.3 — 2026-01-30
- 5.1.0 — 2026-01-16
- 5.0.3 — 2026-01-12
- 5.0.2 — 2026-01-12
- 5.0.0 — 2026-01-08
- 4.5.0 — 2025-11-18
- 4.4.0 — 2025-09-17
- 4.2.0 — 2025-04-29

## README

# Comunica HTTP Rate Limit Actor

[![npm version](https://badge.fury.io/js/%40comunica%2Factor-http-limit-rate.svg)](https://www.npmjs.com/package/@comunica/actor-http-limit-rate)

An [HTTP](https://github.com/comunica/comunica/tree/master/packages/bus-http) actor that performs rate limiting,
by spacing out future requests based on past request durations,
in an attempt to match the number of requests sent per second to the number of responses served per second by the server.
By default, the actor waits for the first request to fail for a given host prior to spacing out requests.

This module is part of the [Comunica framework](https://github.com/comunica/comunica),
and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).

[Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).

## Install

```bash
$ yarn add @comunica/actor-http-limit-rate
```

## Configure

After installing, this package can be added to your engine's configuration as follows:

```json
{
  "@context": [
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-limit-rate/^5.0.0/components/context.jsonld"
  ],
  "actors": [
    {
      "@id": "urn:comunica:default:http/actors#limit-rate",
      "@type": "ActorHttpLimitRate"
    }
  ]
}
```

### Config Parameters

* `mediatorHttp`: A mediator over the [HTTP bus](https://github.com/comunica/comunica/tree/master/packages/bus-http).
* `httpInvalidator`: A mediator over the [HTTP invalidate bus](https://github.com/comunica/comunica/tree/master/packages/bus-http-invalidate).
* `correctionMultiplier`: How aggressively the request interval should follow the latest response time. Defaults to `0.1`.
* `failureMultiplier`: The response time of a failed request is taken into account with this multiplier applied. Defaults to `10.0`.
* `limitByDefault`: Whether the actor should do rate limiting by default, already before a request fails. Defaults to `false`.
* `allowOverlap`: Whether the actor should allow overlapping requests to be sent to the server when rate limiting is applied. Defaults to `false`.

---
_Source: https://npm.io/package/@comunica/actor-http-limit-rate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
