Skip to main content

machine jwt profile grant benchmark of zitadel v2.70.0

The performance goals of this issue are reached. Next we will test linear scalability.

Performance test results​

MetricValue
Baselinenone
PurposeTest current performance
Test start09:48 UTC
Test duration30min
Executed testmachine_jwt_profile_grant
k6 versionv0.57.0
VUs600
Client locationUS1
ZITADEL locationUS1
ZITADEL container specificationvCPU: 6
Memory: 6 Gi
Container min scale: 2
Container max scale: 7
ZITADEL Versionv2.70.0
ZITADEL feature flagswebKey: true, improvedPerformance: ["IMPROVED_PERFORMANCE_ORG_BY_ID", "IMPROVED_PERFORMANCE_PROJECT", "IMPROVED_PERFORMANCE_USER_GRANT", "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", "IMPROVED_PERFORMANCE_PROJECT_GRANT"]
Databasetype: psql
version: v17.2
Database locationUS1
Database specificationvCPU: 8
memory: 32Gib
ZITADEL metrics during test
Observed errors
Top 3 most expensive database queries1: Write events using eventstore.push function
2: Query user
3: Query events by instance id, aggregate type, aggregate id, event types, owner
k6 Iterations per second1806
k6 outputoutput
flowchart outcomeScale out

Endpoint latencies​

k6 output​

     βœ“ openid configuration
βœ— token status ok
↳ 99% β€” βœ“ 3289559 / βœ— 5
βœ— access token returned
↳ 99% β€” βœ“ 3289559 / βœ— 5

β–ˆ setup

βœ“ user defined
βœ“ authorize status ok
βœ“ login name status ok
βœ“ login shows password page
βœ“ password status ok
βœ“ password callback
βœ“ code set
βœ“ token status ok
βœ“ access token created
βœ“ id token created
βœ“ info created
βœ“ org created
βœ“ create user is status ok
βœ“ generate machine key status ok

β–ˆ teardown

βœ“ org removed

checks...............................: 99.99% 6580931 out of 6580941
data_received........................: 4.8 GB 2.6 MB/s
data_sent............................: 2.8 GB 1.5 MB/s
http_req_blocked.....................: min=110ns avg=53.66Β΅s max=937.62ms p(50)=420ns p(95)=660ns p(99)=989ns
http_req_connecting..................: min=0s avg=22.26Β΅s max=532.7ms p(50)=0s p(95)=0s p(99)=0s
http_req_duration....................: min=16.42ms avg=323.71ms max=3.4s p(50)=209.85ms p(95)=903.86ms p(99)=1.01s
{ expected_response:true }.........: min=16.42ms avg=323.71ms max=3.4s p(50)=209.85ms p(95)=903.85ms p(99)=1.01s
http_req_failed......................: 0.00% 5 out of 3291974
http_req_receiving...................: min=18.23Β΅s avg=1.73ms max=913.21ms p(50)=73.15Β΅s p(95)=8.73ms p(99)=29.35ms
http_req_sending.....................: min=17.54Β΅s avg=53.13Β΅s max=501.66ms p(50)=46.07Β΅s p(95)=75.92Β΅s p(99)=120.24Β΅s
http_req_tls_handshaking.............: min=0s avg=29.45Β΅s max=657.29ms p(50)=0s p(95)=0s p(99)=0s
http_req_waiting.....................: min=3.84ms avg=321.92ms max=3.4s p(50)=206.45ms p(95)=901.97ms p(99)=1.01s
http_reqs............................: 3291974 1807.469453/s
iteration_duration...................: min=18.62ms avg=328.21ms max=3.41s p(50)=215.77ms p(95)=907.48ms p(99)=1.01s
iterations...........................: 3289564 1806.146234/s
login_ui_enter_login_name_duration...: min=131.65ms avg=131.65ms max=131.65ms p(50)=131.65ms p(95)=131.65ms p(99)=131.65ms
login_ui_enter_password_duration.....: min=18.55ms avg=18.55ms max=18.55ms p(50)=18.55ms p(95)=18.55ms p(99)=18.55ms
login_ui_init_login_duration.........: min=68.72ms avg=68.72ms max=68.72ms p(50)=68.72ms p(95)=68.72ms p(99)=68.72ms
login_ui_token_duration..............: min=77.56ms avg=77.56ms max=77.56ms p(50)=77.56ms p(95)=77.56ms p(99)=77.56ms
oidc_token_duration..................: min=16.42ms avg=323.79ms max=3.4s p(50)=209.87ms p(95)=903.91ms p(99)=1.01s
org_create_org_duration..............: min=38.42ms avg=38.42ms max=38.42ms p(50)=38.42ms p(95)=38.42ms p(99)=38.42ms
user_add_machine_key_duration........: min=23.47ms avg=280.32ms max=851.94ms p(50)=304.18ms p(95)=437.53ms p(99)=443.37ms
user_create_machine_duration.........: min=63.91ms avg=406.02ms max=663.96ms p(50)=437.61ms p(95)=518.85ms p(99)=521.88ms
vus..................................: 425 min=0 max=600
vus_max..............................: 600 min=600 max=600


running (30m21.3s), 000/600 VUs, 3289564 complete and 0 interrupted iterations
default βœ“ [======================================] 600 VUs 30m0s