# Usage and limits

URL: https://docs.folkways.io/docs/console/usage

How Folkways counts connections, messages and data transfer, where to see usage, and what happens near and over a limit.

## What is counted [#what-is-counted]

| Meter | Counts | Notes |
| --- | --- | --- |
| **Connections** | Connections open at the same time, across the workspace | WebSocket connections plus HTTP requests in progress |
| **Messages** | Every publish plus every delivery | One publish to 10 subscribers is 11 messages. Replays, snapshots, long-poll deliveries and KV expiry count as deliveries. A retried publish that was a duplicate isn't counted again |
| **Data transfer** | Bytes in plus bytes out, as sent over the wire | Includes the protocol's framing, not only your payloads |
| **Topics** | Topics that exist at once | A topic exists while it has subscribers, retained events or current values |

Presence entries and their deliveries are never counted as messages. Allowances are monthly, from the day your
subscription started, even on annual billing.

## Where to see it [#where-to-see-it]

- **Analytics** in the Console charts connections, messages published and delivered, and data, over the last 24
  hours, 7 days or 30 days, for the workspace or one segment, with each segment's current connections and topics.
- The [Platform API](/docs/platform-api/usage) returns the same reports, and the current period's totals against
  your allowances, for your own dashboards.

## Near and over a limit [#near-and-over-a-limit]

No limit cuts traffic off at once.

**Messages and data transfer**

1. At 80% of an allowance, owners and admins are warned.
2. Over it, a grace period starts (its length depends on the package). Service carries on, up to a safety ceiling
   above the allowance.
3. After the grace period, if usage is still over, **new publishes** are refused with `QuotaExceeded` until the next
   period, or until you upgrade. Subscriptions and deliveries keep working.

**Connections**

1. The first time in a period the workspace goes over its connection allowance, a grace window opens, letting it
   hold a margin more connections for a few days.
2. After that, new connections are refused with `QuotaExceeded` while the workspace is over. **Open connections are
   never closed.**
3. Grace opens once per period; an upgrade makes it available again.

**Segment caps** you set yourself apply first; see [monthly caps](/docs/console/segments#monthly-caps).

Upgrading lifts a restriction within about a minute.

## Rate limits [#rate-limits]

Separately from allowances, each segment has rate limits (publishes per second, bytes per second, subscribes and new
connections per minute), set by its [rate preset](/docs/console/segments#rate-preset). Over a rate limit a request
is refused with `RateLimited` and a delay to wait; nothing is published, and the connection stays open. See
[Limits](/docs/realtime-api/limits).
