Authdog

Authorization performance

Last updated Nov 19, 2026
View as Markdown

Authdog decides access with one of three engines: role checks for RBAC, a Rego evaluator for ABAC, and a relationship graph walk for FGA. This page reports how long each one takes to compute a decision, how that was measured, and how the same workloads run on three open-source engines on the same machine.

Every figure here comes from one recorded run on 2026-11-18. The tables are generated from the result files, not typed by hand.

What is measured

Engine time. One decision, computed in process, with everything the engine needs already in memory: the roles a user holds, the parsed policy, the relationship tuples.

Not measured. Network time between your service and Authdog, and the time to read roles, policies or tuples from storage. A call to the hosted API includes both, so a request to /access/v1/evaluation takes longer than the figures on this page. Use these numbers to compare engines and to see what the decision itself costs, not as an API latency promise.

Setup

Machine Intel Core Ultra 7 165H, Linux, one core for Authdog (process pinned)
Authdog runtime Node 24.7.0 (V8 13.6.233.10-node.26)
Per scenario 1 s warm-up, then 2 s timed in batches of 500 for throughput, then 2 s timing every call for the percentiles
Statistic Median and 99th percentile of single-call times; decisions per second from the batch phase
Date 2026-11-18

Authdog runs in production on Cloudflare Workers. The same scenarios were repeated inside workerd 1.20260730, the Workers runtime. workerd does not let code time itself, so batches were timed from outside and only a mean is available: at the median scenario the workerd mean was 1% higher than the Node mean, and it ranged from 17% lower than to 45% higher than it across the middle 80% of scenarios. Node is used for the tables because it can time single calls.

Authdog results

RBAC

A user holds a number of roles; each role grants actions on one resource type. The question is whether any role grants the action on the resource.

Scenario Median p99 Decisions per second, one core
5 roles, allow on 1st 0.09 µs 0.17 µs 13,683,136
5 roles, allow on last 0.23 µs 0.40 µs 4,566,306
50 roles, allow on last 1.6 µs 3.0 µs 602,081
50 roles, DENY 1.6 µs 3.1 µs 599,828

A complete AuthZEN exchange around an RBAC decision (parse the JSON request, validate it, decide, build and serialize the response):

Scenario Median p99 Decisions per second, one core
JSON parse + validate + RBAC(5) + serialize 1.4 µs 2.6 µs 706,586

Agents

An agent or workload identity asks to call an MCP tool. The decision checks the tool against the grants on the agent's trust-store entry, here ten of them (exact tools and whole servers).

Scenario Median p99 Decisions per second, one core
Allow, first of 10 tool grants 0.51 µs 0.91 µs 2,001,125
Allow, last of 10 tool grants 3.1 µs 5.6 µs 308,353
Deny, tool not granted 3.1 µs 6.0 µs 314,382

Session tokens

Issuing and verifying the signed token a session carries, through the identity service's own helpers, with the signing key already imported (it is imported once per key and kept). The signature algorithm sets the cost; RS256 is the default for new environments.

Scenario Median p99 Tokens per second, one core
Verify, EdDSA (Ed25519) 151 µs 206 µs 5,802
Issue, EdDSA (Ed25519) 82 µs 124 µs 11,619
Verify, ES256 (P-256) 116 µs 162 µs 8,154
Issue, ES256 (P-256) 78 µs 115 µs 12,596
Verify, RS256 (2048-bit) 57 µs 83 µs 16,533
Issue, RS256 (2048-bit) 646 µs 975 µs 1,492

ABAC

Policies are written in Rego and evaluated by Authdog's own Rego engine. "Warm" means the policy is already parsed, which is the case for every decision after the first one for a policy version. "Cold" includes parsing the policy.

Scenario Median p99 Decisions per second, one core
Starter policy, allow (warm engine) 2.6 µs 5.0 µs 362,997
40-line policy, allow on 2nd rule (warm) 6.5 µs 11 µs 138,721
40-line policy, allow on 1st rule (warm) 5.5 µs 9.7 µs 170,231
40-line policy, DENY all 4 rules (warm) 6.4 µs 11 µs 147,071
40-line policy, COLD (parse + first eval) 51 µs 181 µs 9,216

The 40-line policy has four allow rules, three helper rules, a set, and comparisons on subject, resource and context attributes. Its source is at the end of this page.

FGA

A store of 253,151 relationship tuples: 10,000 users in 500 groups, 2,000 folder trees ten levels deep, five documents per folder. Checks use the model at the end of this page.

Scenario Median p99 Decisions per second, one core
Direct grant (owner) 0.37 µs 0.69 µs 2,621,912
Direct grant (viewer) 0.40 µs 0.74 µs 2,690,039
Computed: viewer <- editor <- owner 0.83 µs 1.5 µs 1,106,651
Group membership (40 members) 0.64 µs 1.3 µs 1,581,901
Nested groups (4 levels) 1.6 µs 2.8 µs 604,102
Public wildcard user:* 0.41 µs 0.74 µs 2,569,642
Exclusion (viewer but not banned) deny 0.77 µs 1.5 µs 1,303,864
Intersection (owner and editor) 0.86 µs 1.6 µs 1,170,137
Inherited, folder depth 1 (owner of root) 1.6 µs 3.3 µs 583,316
Inherited, folder depth 5 (owner of root) 4.0 µs 6.8 µs 224,622
Inherited, folder depth 10 (owner of root) 7.5 µs 12 µs 129,212
Inherited, depth 10 via group on root 15 µs 22 µs 60,870
DENY, shallow doc (full traversal) 1.2 µs 2.1 µs 856,738
DENY, folder depth 10 (worst case) 15 µs 23 µs 64,802
Wide: 100 direct viewers, last match 0.41 µs 0.82 µs 2,520,608
Wide: 1,000 direct viewers, last match 0.43 µs 0.77 µs 2,462,131
Wide: 10,000 direct viewers, last match 0.45 µs 0.83 µs 2,315,514
Contextual tuple overlay 1.2 µs 2.3 µs 461,441
BatchCheck x100 (mixed allow/deny, depth 0-9) 1,015 µs 1,404 µs 959

A check costs the same on an object with 10,000 direct viewers as on one with a single viewer, because direct membership is a lookup and not a scan. Deny is the slowest outcome: every path has to be walked before the answer is no.

Compared with open-source engines

Three engines were run on the same machine with the same workloads, each embedded in the benchmark process with its in-memory store and default settings, with no network in between:

  • Casbin 2.135.0 (Go) for RBAC, using its standard RBAC model.
  • Open Policy Agent 1.22.4 (Go SDK, prepared query) for ABAC, running the identical Rego source on the identical input.
  • OpenFGA 1.22.1 (Go, server embedded in process) for FGA, with the identical model and tuples.

They are compiled Go programs (Go 1.26.0); Authdog's engines are TypeScript on V8. Each was run twice, once on all cores and once pinned to one core, and the better median of the two is shown. Authdog's figures are from its pinned run.

RBAC, Authdog and Casbin

Scenario Authdog median Casbin median Authdog is
5 roles, allow on 1st 0.09 µs 2.2 µs 24x faster
5 roles, allow on last 0.23 µs 3.7 µs 16x faster
50 roles, allow on last 1.6 µs 20 µs 12x faster
50 roles, DENY 1.6 µs 20 µs 12x faster

ABAC, Authdog and Open Policy Agent

Scenario Authdog median Open Policy Agent median Authdog is
Starter policy, allow (warm engine) 2.6 µs 6.3 µs 2.5x faster
40-line policy, allow on 2nd rule (warm) 6.5 µs 15 µs 2.4x faster
40-line policy, allow on 1st rule (warm) 5.5 µs 13 µs 2.4x faster
40-line policy, DENY all 4 rules (warm) 6.4 µs 13 µs 2.1x faster
40-line policy, COLD (parse + first eval) 51 µs 436 µs 8.5x faster

Both engines receive the input as a native value and convert it on each call, and that conversion is part of the times above. With the input already converted, evaluating the 40-line policy alone takes 3.3 µs in Authdog and 10 µs in Open Policy Agent. The cold row includes parsing the policy, which matters where a policy is parsed often: at the edge, each new isolate and each new policy version starts cold.

FGA, Authdog and OpenFGA

Scenario Authdog median OpenFGA median Authdog is
Direct grant (owner) 0.42 µs 16 µs 37x faster
Direct grant (viewer) 0.43 µs 82 µs 192x faster
Computed: viewer <- editor <- owner 0.88 µs 110 µs 125x faster
Group membership (40 members) 0.68 µs 113 µs 167x faster
Nested groups (4 levels) 1.6 µs 166 µs 102x faster
Public wildcard user:* 0.43 µs 82 µs 191x faster
Exclusion (viewer but not banned) deny 0.81 µs 26 µs 33x faster
Intersection (owner and editor) 0.90 µs 78 µs 87x faster
Inherited, folder depth 1 (owner of root) 1.6 µs 204 µs 126x faster
Inherited, folder depth 5 (owner of root) 4.1 µs 522 µs 127x faster
Inherited, folder depth 10 (owner of root) 7.5 µs 1,020 µs 136x faster
Inherited, depth 10 via group on root 14 µs 1,180 µs 82x faster
DENY, shallow doc (full traversal) 1.2 µs 113 µs 95x faster
DENY, folder depth 10 (worst case) 15 µs 1,245 µs 84x faster

This comparison uses a store of 108 tuples, the ones these scenarios can reach, for both engines. OpenFGA's in-memory datastore reads by scanning every tuple, so on the full 253,151-tuple store its times would reflect that scan and not its check logic. OpenFGA is normally run against a database with indexes and with caching enabled; this measures the check path itself with neither.

Limits of these numbers

  • One machine, a laptop processor. Absolute times will differ on other hardware; the ratios between engines are the more portable result.
  • These are microbenchmarks of specific workloads. A different model, policy or data shape will give different times.
  • The engines are built for different deployments. OpenFGA and Open Policy Agent are most often run as servers or sidecars, where a network hop is added to every decision. That hop is not measured here for any engine, Authdog included.
  • Engine time is one part of a decision in production. Reading data from storage usually costs more than the decision.

Workloads

The FGA model:

model
  schema 1.1

type user

type group
  relations
    define member: [user, group#member]

type folder
  relations
    define parent: [folder]
    define owner: [user]
    define editor: [user, group#member] or owner or editor from parent
    define viewer: [user, user:*, group#member] or editor or viewer from parent

type doc
  relations
    define parent: [folder]
    define owner: [user]
    define banned: [user]
    define editor: [user, group#member] or owner or editor from parent
    define viewer: [user, user:*, group#member] or editor or viewer from parent
    define can_share: owner and editor
    define can_read: viewer but not banned

The 40-line Rego policy:

package authdog.authz

import rego.v1

default allow := false

admin_roles := {"admin", "owner"}

is_admin if {
  some role in input.subject.properties.roles
  role in admin_roles
}

same_department if {
  input.subject.properties.department == input.resource.properties.department
}

business_hours if {
  input.context.hour >= 8
  input.context.hour < 19
}

allow if {
  is_admin
}

allow if {
  input.action.verb == "read"
  same_department
  input.resource.properties.classification != "restricted"
}

allow if {
  input.action.verb in {"update", "create"}
  input.resource.properties.owner == input.subject.id
  business_hours
}

allow if {
  input.action.verb == "read"
  "auditor" in input.subject.properties.roles
  startswith(input.resource.type, "invoice")
  input.context.mfa == true
}

The small Rego policy:

package authdog.authz

import rego.v1

default allow := false

allow if {
  input.resource.type == "mcp_tool"
  input.action.verb == "execute"
}

The input for the "allow on 2nd rule" scenario:

{
  "environmentId": "env_1",
  "subject": {
    "type": "user",
    "id": "u-123",
    "properties": {
      "roles": [
        "member",
        "billing"
      ],
      "department": "finance"
    },
    "internalId": "u-123"
  },
  "action": {
    "name": "can_read",
    "verb": "read"
  },
  "resource": {
    "type": "invoice",
    "id": "inv-42",
    "properties": {
      "department": "finance",
      "classification": "internal",
      "owner": "u-999"
    }
  },
  "context": {
    "hour": 14,
    "mfa": false,
    "ip": "203.0.113.7"
  }
}

Learn more