[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Protocol](https://evolu.dev/docs/api-reference/common/local-first/Protocol) › ProtocolMessageRangesMaxSize

```ts
const ProtocolMessageRangesMaxSize: between(
  3_000,
  maxProtocolMessageRangesMaxSize,
)(Int);
```

Defined in: [packages/common/src/local-first/Protocol.ts:373](https://github.com/evoluhq/evolu/blob/ce3eb809eb57a41429fb1d59d3c335e355814533/packages/common/src/local-first/Protocol.ts#L373)

Protocol message ranges maximum size.

Defines the upper limit for how large the ranges section of a protocol
message can be. Implementations must enforce a maximum size between 3KB and
100KB to ensure compatibility.

The upper bound is set to ensure ranges fit within the default 1MB
[defaultProtocolMessageMaxSize](https://evolu.dev/docs/api-reference/common/local-first/Protocol/variables/defaultProtocolMessageMaxSize), maintaining compatibility between all
clients and relays. A received message whose ranges section exceeds twice the
upper bound is rejected as [ProtocolInvalidDataError](https://evolu.dev/docs/api-reference/common/local-first/Protocol/interfaces/ProtocolInvalidDataError).