Shaik Mohammad Abdullah
12/18/2025, 11:41 AMAsk Inkeep
12/18/2025, 11:41 AMAsk Inkeep
12/18/2025, 11:41 AMAsk Inkeep
12/18/2025, 11:41 AMAlon Boshi
12/18/2025, 11:49 AMShaik Mohammad Abdullah
12/18/2025, 11:49 AMpermitio/pdp-v2:latestAlon Boshi
12/18/2025, 11:53 AMShaik Mohammad Abdullah
12/18/2025, 11:54 AMShaik Mohammad Abdullah
12/18/2025, 11:56 AMShaik Mohammad Abdullah
12/18/2025, 12:01 PMAlon Boshi
12/18/2025, 12:12 PMCREATE DATASET call is taking around 7.45 seconds, causing the delay. Cache hits look fine, so the latency is likely during that step on the PDP side.
Could you share your current PDP resource allocation (CPU, memory, etc.)?
Increasing these might help improve performance.Shaik Mohammad Abdullah
12/18/2025, 12:22 PMShaik Mohammad Abdullah
12/18/2025, 12:26 PMAlon Boshi
12/18/2025, 12:29 PMAsk Inkeep
12/18/2025, 12:29 PMAsk Inkeep
12/18/2025, 12:29 PMhelm install pdp pdp/pdp \
--set pdp.resources.requests.cpu="512m" \
--set pdp.resources.requests.memory="1Gi" \
--set pdp.resources.limits.memory="2Gi" \
--namespace permit-platform
To upgrade an existing deployment with adjusted resources:
helm upgrade pdp pdp/pdp \
--set pdp.resources.requests.memory="512Mi" \
--namespace permit-platform
*If using Docker directly*, resource allocation is set via Docker run flags (e.g., --memory, --cpus) .
A similar latency issue was resolved by increasing the sidecar resources. (2)
*Recommendations:*
• Increase CPU and memory allocation for your PDP container
• For high availability and better performance, consider deploying multiple PDP replicas (1)
Could you share your current deployment method (Docker Compose, Kubernetes, etc.) and the resource limits currently set? That will help narrow down the best adjustment.Ask Inkeep
12/18/2025, 12:29 PMShaik Mohammad Abdullah
12/18/2025, 12:31 PMShaik Mohammad Abdullah
12/18/2025, 12:33 PMShaik Mohammad Abdullah
12/18/2025, 12:35 PMAlon Boshi
12/18/2025, 12:48 PMPDP_DEBUG=True has a performance penalty and is recommended to be disabled in production environments.
Try running with debug mode disabled:
docker run -it \
-p 7766:7000 \
--env PDP_API_KEY=<YOUR_API_KEY> \
--env PDP_DEBUG=False \
permitio/pdp-v2:latest
This alone could improve your POST method latency.Shaik Mohammad Abdullah
12/18/2025, 12:51 PMShaik Mohammad Abdullah
12/18/2025, 12:55 PMDan
12/18/2025, 1:31 PMShaik Mohammad Abdullah
12/18/2025, 4:15 PMShaik Mohammad Abdullah
12/18/2025, 4:17 PMThomas
12/18/2025, 4:24 PMShaik Mohammad Abdullah
12/18/2025, 4:26 PMShaik Mohammad Abdullah
12/18/2025, 4:28 PMThomas
12/18/2025, 4:29 PMThomas
12/18/2025, 4:30 PMProxyFactsViaPdp: true is just for proxying writes and reads still happen at the api: https://docs.permit.io/how-to/manage-data/local-facts-uploader/#supported-apis See here for supported calls.Shaik Mohammad Abdullah
12/18/2025, 4:32 PMThe list resource instances call is an API endpoint at <http://api.permit.io|api.permit.io>; not the PDP.
Sorry, Did not get youThomas
12/18/2025, 4:34 PMThomas
12/18/2025, 4:35 PMawait this.permit.api.resourceInstances.list() makes a call to api.permit.io so it isn't a 0 network latent call.Shaik Mohammad Abdullah
12/18/2025, 4:39 PMShaik Mohammad Abdullah
12/18/2025, 4:42 PMDan
12/18/2025, 4:44 PMThomas
12/18/2025, 4:44 PMpermit.apiThomas
12/18/2025, 4:44 PMThomas
12/18/2025, 4:45 PMThomas
12/18/2025, 4:45 PMShaik Mohammad Abdullah
12/18/2025, 4:45 PMShaik Mohammad Abdullah
12/18/2025, 5:04 PMThomas
12/18/2025, 5:15 PMpermit.getUserPermissions() endpoint. something like:
const userPermissions = await permit.getUserPermissions(
"<mailto:john@doe.com|john@doe.com>",
["default"],
[],
["project"]
);Thomas
12/18/2025, 5:16 PMShaik Mohammad Abdullah
12/18/2025, 5:56 PMAlon Boshi
12/18/2025, 6:08 PMAsk Inkeep
12/18/2025, 6:08 PMAsk Inkeep
12/18/2025, 6:08 PMpermit.api.* methods call the Permit.io cloud API (<http://api.permit.io|api.permit.io>) to sync your policy data. These are not local calls, so network latency to the cloud applies. (1)
*For authorization queries (READ/check permissions) :*
Use methods like permit.check(), permit.getUserPermissions(), and permit.authorizedUsers() which query your local PDP at localhost:7766. These provide zero network latency since decisions are made locally within your infrastructure. (2)
Here's an example of a local authorization check: (3)
const permitted = await permit.check("<mailto:john@permit.io|john@permit.io>", "create", "document") ;
if (permitted) {
console.log("John is PERMITTED to create a document") ;
} else {
console.log("John is NOT PERMITTED to create a document") ;
}
And for getting user permissions locally: (1)
const userPermissions = await permit.getUserPermissions(
"<mailto:john@doe.com|john@doe.com>",
["default"],
[],
["project"]
) ;
This approach gives you sub-millisecond latency for authorization decisions while keeping your policy data synced with the cloud. (2) Ask Inkeep
12/18/2025, 6:08 PMShaik Mohammad Abdullah
12/18/2025, 6:11 PMAsk Inkeep
12/18/2025, 6:11 PMAsk Inkeep
12/18/2025, 6:11 PM<http://api.permit.io|api.permit.io>, reducing network round-trips. (1)
Here's how to enable it in Node.js:
const permit = new Permit({
token: "<your-api-key>",
pdp: "<http://localhost:7766>",
proxyFactsViaPdp: true
}) ;
With proxyFactsViaPdp enabled, the API call routes through your local PDP and waits until the data is synced before returning—giving you faster writes and immediate consistency for subsequent permission checks.
*Supported write operations through the PDP proxy:*
• POST /facts/users
• PUT /facts/users/{user_id}
• PATCH /facts/users/{user_id}
• POST /facts/tenants
• POST /facts/users/{user_id}/roles
• POST /facts/role_assignments
• POST /facts/resource_instances
• PATCH /facts/resource_instances/{instance_id}
• POST /facts/relationship_tuples
*Note:* This requires PDP version 0.5.1 or above.
For operations not in the supported list (like resourceInstances.list()) , those will still route to <http://api.permit.io|api.permit.io> and network latency will apply.Ask Inkeep
12/18/2025, 6:11 PMThomas
12/18/2025, 8:12 PMproxyFactsViaPdp:true just ensures that the data is in the PDP so you can authorize immediately after you CUD. The time it takes for your app to reach api.permit.io is unavoidable in that scenario, as the PDP is just proxying them. we do have 2 regions, one is the east-US and one in EU so EU may be faster if you're on that side of the world.Shaik Mohammad Abdullah
12/18/2025, 8:15 PMShaik Mohammad Abdullah
12/18/2025, 8:19 PMThomas
12/19/2025, 3:10 PM