@@ -3,27 +3,35 @@ id: hydra
3
3
title : ORY Hydra
4
4
---
5
5
6
- In this document you will find benchmark results for different endpoints of ORY Hydra. All benchmarks are executed
7
- using [ rakyll/hey] ( https://github.com/rakyll/hey ) . Please note that these benchmarks run against the in-memory storage
8
- adapter of ORY Hydra. These benchmarks represent what performance you would get with a zero-overhead database implementation.
9
-
10
- We do not include benchmarks against databases (e.g. MySQL, PostgreSQL or CockroachDB) as the performance greatly differs between
11
- deployments (e.g. request latency, database configuration) and tweaking individual things may greatly improve performance.
12
- We believe, for that reason, that benchmark results for these database adapters are difficult to generalize and potentially
6
+ In this document you will find benchmark results for different endpoints of ORY
7
+ Hydra. All benchmarks are executed using
8
+ [ rakyll/hey] ( https://github.com/rakyll/hey ) . Please note that these benchmarks
9
+ run against the in-memory storage adapter of ORY Hydra. These benchmarks
10
+ represent what performance you would get with a zero-overhead database
11
+ implementation.
12
+
13
+ We do not include benchmarks against databases (e.g. MySQL, PostgreSQL or
14
+ CockroachDB) as the performance greatly differs between deployments (e.g.
15
+ request latency, database configuration) and tweaking individual things may
16
+ greatly improve performance. We believe, for that reason, that benchmark results
17
+ for these database adapters are difficult to generalize and potentially
13
18
deceiving. They are thus not included.
14
19
15
- This file is updated on every push to master. It thus represents the benchmark data for the latest version.
20
+ This file is updated on every push to master. It thus represents the benchmark
21
+ data for the latest version.
16
22
17
- All benchmarks run 10.000 requests in total, with 100 concurrent requests. All benchmarks run on Circle-CI with a
23
+ All benchmarks run 10.000 requests in total, with 100 concurrent requests. All
24
+ benchmarks run on Circle-CI with a
18
25
[ "2 CPU cores and 4GB RAM"] ( https://support.circleci.com/hc/en-us/articles/360000489307-Why-do-my-tests-take-longer-to-run-on-CircleCI-than-locally- )
19
26
configuration.
20
27
21
28
## BCrypt
22
29
23
- ORY Hydra uses BCrypt to obfuscate secrets of OAuth 2.0 Clients. When using flows such as the OAuth 2.0 Client Credentials
24
- Grant, ORY Hydra validates the client credentials using BCrypt which causes (by design) CPU load. CPU load and performance
25
- depend on the BCrypt cost which can be set using the environment variable ` BCRYPT_COST ` . For these benchmarks,
26
- we have set ` BCRYPT_COST=8 ` .
30
+ ORY Hydra uses BCrypt to obfuscate secrets of OAuth 2.0 Clients. When using
31
+ flows such as the OAuth 2.0 Client Credentials Grant, ORY Hydra validates the
32
+ client credentials using BCrypt which causes (by design) CPU load. CPU load and
33
+ performance depend on the BCrypt cost which can be set using the environment
34
+ variable ` BCRYPT_COST ` . For these benchmarks, we have set ` BCRYPT_COST=8 ` .
27
35
28
36
## OAuth 2.0
29
37
@@ -39,7 +47,7 @@ Summary:
39
47
Fastest: 0.0003 secs
40
48
Average: 0.0220 secs
41
49
Requests/sec: 4265.3079
42
-
50
+
43
51
Total data: 1550000 bytes
44
52
Size/request: 155 bytes
45
53
@@ -92,7 +100,7 @@ Summary:
92
100
Fastest: 0.0171 secs
93
101
Average: 0.1901 secs
94
102
Requests/sec: 501.9053
95
-
103
+
96
104
Total data: 1570000 bytes
97
105
Size/request: 157 bytes
98
106
@@ -137,8 +145,9 @@ Status code distribution:
137
145
138
146
### Creating OAuth 2.0 Clients
139
147
140
- This endpoint uses [ BCrypt] ( #bcrypt ) and generates IDs and secrets by reading from which negatively impacts
141
- performance. Performance will be better if IDs and secrets are set in the request as opposed to generated by ORY Hydra.
148
+ This endpoint uses [ BCrypt] ( #bcrypt ) and generates IDs and secrets by reading
149
+ from which negatively impacts performance. Performance will be better if IDs and
150
+ secrets are set in the request as opposed to generated by ORY Hydra.
142
151
143
152
```
144
153
This test is currently disabled due to issues with /dev/urandom being inaccessible in the CI.
@@ -154,7 +163,7 @@ Summary:
154
163
Fastest: 0.0001 secs
155
164
Average: 0.0037 secs
156
165
Requests/sec: 24815.7713
157
-
166
+
158
167
Total data: 4820000 bytes
159
168
Size/request: 482 bytes
160
169
@@ -205,7 +214,7 @@ Summary:
205
214
Fastest: 0.0001 secs
206
215
Average: 0.0035 secs
207
216
Requests/sec: 26457.0881
208
-
217
+
209
218
Total data: 4800000 bytes
210
219
Size/request: 480 bytes
211
220
0 commit comments