#Permify Performances Improvement
1 messages · Page 1 of 1 (latest)
Hey @marble gate,
Regarding this issue I have a few questions;
- Are the PostgreSQL and Sidecars in the same VPC?
- How many sidecars are we talking about?
- How many calls per sec are you sending to each sidecar on avg.?
- Is there any other details you can share with us about your architecture?
Permify works best as a standalone micro-service rather than as a Sidecar pattern.
But still seconds is abnormal, so would love to assist you with this issue, would you like to schedule a quick call with us, so we can understand the problem deeply?
Here's our calendar: https://meetings-eu1.hubspot.com/fred-dogan/call-with-an-expert
- PostgreSQL and sidecars in same VPC
- One sidecar per NodeJS app (currently having 2 nodeJS apps)
- In total we have ~15 API calls per second so let's say 8 calls/s to permify (2 pods running)
Thank you for your advice with standalone microservice instead of sidecar pattern. I will try that too.
Hello @marble gate , while you're trying this, if you can connect a tracing tool like Jaeger, it might help us see where this time is being spent. Also, which version of Permify are you using?
0.4.8 (we're in the same team)
Can you explain why permify works best as a micro service than as a sidecar pattern ?
Hello @steady crater , currently the version is 0.5.4. Is the response time the same in this version? And can you provide the Permify config without the confidential information?
Last time I tried upgrading most of my previous implementations stopped working, even after having changed the API. I'm afraid we'd need to refactor quite a bit
Nonetheless we'll have to do it at some point
The reason for this is that Permify implements consistent hashing, and as the number of nodes increases, the performance improves. However, taking seconds is still too much.
Yes, there were major changes in v0.5, especially with the addition of this: https://docs.permify.co/docs/use-cases/abac. We updated the documentation accordingly. You can proceed step by step through the API overview.
the problems is less about the API but about the consistency of the results. lets take it offline
I just implemented the v0.5.4 but I got this error message for operation Data.ReadRelationships
ERROR: function max(xid8) does not exist (SQLSTATE 42883)
I'm using npm package with version: 0.4.1
Which version of Postgres are you using?
Same issue occurred again. Our team is trying to identify the problem, and we will have it resolved in our upcoming release.
14.7
I see that version 16 was released last month
According to the official website here are the types supported for v14
inet, interval, money, oid, pg_lsn, tid, and arrays of any of these types
So, no xid8
While in version v16 it seems to be supported
we have released a few updates for it to work on this version of PostgreSQL. Can you test with this image? ghcr.io/permify/permify-beta:latest
Alright, we will conduct the necessary tests and add this in the next release
@stray ferry I understand there was a change into ABAC, currently our issue (same team as well) is related to performance. Are there performance improvements in version 0.5.4 that justify upgrading at the moment (assuming we are not planning to use ABAC in the near future) ?
are there any major security updates ?
Hello @lone bronze , some security updates have been made, but minor performance improvements were also done. Currently, our team is working on improvements for consistent hashring load balancer so significant performance enhancements will be released in the upcoming release.
I share here our current configuration:
- name: PERMIFY_DATABASE_AUTO_MIGRATE
value: "true"
- name: PERMIFY_DATABASE_ENGINE
value: postgres
- name: PERMIFY_DATABASE_GARBAGE_ENABLED
value: "false"
- name: PERMIFY_DATABASE_MAX_CONNECTION_IDLE_TIME
value: 600s
- name: PERMIFY_DATABASE_MAX_CONNECTION_LIFETIME
value: 5000s
- name: PERMIFY_DATABASE_MAX_IDLE_CONNECTIONS
value: "20"
- name: PERMIFY_DATABASE_MAX_OPEN_CONNECTIONS
value: "1500"
- name: PERMIFY_GRPC_PORT
value: "3478"
- name: PERMIFY_HTTP_ENABLED
value: "true"
- name: PERMIFY_HTTP_PORT
value: "3476"
- name: PERMIFY_LOG_LEVEL
value: debug
- name: PERMIFY_RATE_LIMIT
value: "5000"
@stray ferry we got the same error due to older version of postgres - do you have a timeline for an official release for the fixes?
Hello @foggy sable , the release will officially be published tomorrow
ok, thanks!
Hello @marble gate @foggy sable @steady crater , we've released a new update (v0.5.5) that resolves this issue. You can access the package at https://github.com/Permify/permify/pkgs/container/permify.
Awesome, will try it today