Skip to content

Arcjet limitations

Every security product makes trade-offs. This page explains the ones Arcjet makes, so you can design your application around them.

Network security products block traffic before it reaches your application. That works well for high-volume network attacks, so leave those to the DDoS protection built into your hosting platform.

Arcjet runs inside your application, where it can see the request context. It applies the right rules for each route and user, and gives you signals to shape the response. You can show a helpful error message instead of a generic status code.

For example, a network product struggles to tell a free user making excessive API calls from your largest paying customer running important queries. Likewise, you might want to review sign-ups that come from a proxy with a disposable email address, but let sign-ups with a business email through straight away.

Application context makes these decisions possible. The trade-off is that your application receives traffic that a network product would have blocked earlier.

Shield analysis uses headers and query parameters

Section titled “Shield analysis uses headers and query parameters”

Arcjet Shield analyzes the request headers and query parameters. To keep responses fast and false positives low, Shield runs its analysis in the background on the Arcjet platform after the SDK reports the request. For privacy, the SDK doesn’t send the request body to Arcjet, so Shield doesn’t analyze it.

Local request body analysis is on the Arcjet roadmap for Shield.

Arcjet is secure by default. Each detection feature accepts text up to a hard limit, and Arcjet denies text over that limit instead of letting it through unchecked. Padding a request past the limit doesn’t skip detection. A rule in dry run mode reports the same code without blocking, so you can see the effect before you enforce it.

Service issues are handled differently. When Arcjet can’t complete a check, for example because of a timeout, the rule fails open and the decision reports the error. This keeps a temporary service issue from blocking your users. To fail closed instead, check decision.hasFailedOpen() with guard() or decision.isErrored() with protect(), and deny the request yourself. A live rule in an agent guard policy fails closed when it can’t be evaluated.

The following table lists the hard limit for each detection feature:

FeatureLimitWhen you exceed it
Prompt injection detection128 KiB of text per callA live rule denies the request. With guard(), the rule result carries AJ1131.
Content moderation128 KiB of text per callA live rule denies the call, and the rule result carries AJ1141.
On-device sensitive information100,000 characters in JavaScript and Python, 4,096 in GoA live rule denies the request without scanning the text. You can change the limit.

Content moderation evaluates the first 60 KB of the text. Longer text under the hard limit is still moderated on that first part, and Arcjet adds the warning AJ1142 to decision.warnings (decision.Warnings in Go) so you know. The warning doesn’t change the decision. To moderate all of the text, split it into parts and moderate each one.

A guard() call evaluates up to 50 rules. If you pass more, Arcjet reports the rules after the first 50 as not run and adds AJ1003 to decision.warnings (decision.Warnings in Go). A rule that doesn’t run can’t deny, so keep each call to 50 rules or fewer and split a larger set across calls.

An agent guard policy evaluates the inputs that each guard call sends. The following table lists the limits on those inputs. If a call goes over any of them, Arcjet treats its inputs as invalid, and a policy with live rules fails closed. The policy’s expression rules report AJP1003.

LimitValue
Inputs per call64
Server string inputAbout 100 KB
Server string list input256 items, and about 100 KB in total

Quotes, backslashes, and line breaks each count as more than one byte toward these limits, so text with many of them reaches the limit sooner.

Threat detection scores up to 30 distinct public hosts per call. A call that names more fails a live rule closed with AJP1009.

The server-side sensitive information detector fails a live rule closed with AJP1004 when it can’t screen a value in time. Set the Guard client timeout above 3 seconds when you send values longer than 2 KB, so the client doesn’t stop waiting first and fail open.

Capture events, OpenTelemetry ingest, and the Arcjet Console views built on them work within the following limits:

  • Capture is best effort. The SDK queues capture events in memory and sends them in batches, without retrying a failed batch. An event can be lost, for example when a serverless runtime freezes before the batch is sent, so don’t make application behavior depend on a capture call. For more information, see Delivery.
  • OpenTelemetry ingest uses HTTP. Arcjet accepts the http/protobuf and http/json OTLP protocols. It doesn’t accept OTLP over gRPC. For more information, see Send OpenTelemetry data to Arcjet.
  • A Sequence is built from capture events. A Sequence is the capture events that share a correlation ID. Decisions with that correlation ID appear on the Sequence, but decisions alone don’t form one.
  • An AI summary needs a single key. The Arcjet Console summarizes a Sequence when all of its activity arrives under one key: either one actor key, or the project key alone. If two keys use the same correlation ID, the Sequence has no AI summary.
  • Log retention sets how far back you can look. Your plan’s log retention sets how far back you can view captures, decisions, and Sequences. For more information, see Data retention.

Discussion