Skip to main content
Generated content

This document was generated from docs/benchmarking.md in the Unleash Edge GitHub repository.

Benchmarking

Performance

Unleash Edge will scale linearly with CPU. There are k6 benchmarks in the benchmark folder. We've already got some initial numbers from hey.

Do note that the number of requests Edge can handle does depend on the total size of your toggle response. That is, Edge is faster if you only have 10 toggles with 1 strategy each, than it will be with 1000 toggles with multiple strategies on each. Benchmarks here were run with data fetched from the Unleash demo instance (roughly 100kB (350 features / 200 strategies)) as well as against a small dataset of 5 features with one strategy on each.

Edge was started using docker run --cpus="<cpu>" --memory=128M -p 3063:3063 -e UPSTREAM_URL=<upstream> -e TOKENS="<client token>" unleashorg/unleash-edge:edge -w <number of cpus rounded up to closest integer> edge

Then we run hey against the proxy endpoint, evaluating toggles

Large Dataset (350 features (100kB))

$ hey -z 10s -H "Authorization: <frontend token>" http://localhost:3063/api/frontend`
CPUMemoryRPSEndpointp95Data transferred
0.16.7 Mi600/api/frontend103ms76Mi
16.7 Mi6900/api/frontend7.4ms866Mi
49.525300/api/frontend2.4ms3.2Gi
81540921/api/frontend1.6ms5.26Gi

and against our client features endpoint.

$ hey -z 10s -H "Authorization: <client token>" http://localhost:3063/api/client/features
CPUMemory observedRPSEndpointp95Data transferred
0.111 Mi309/api/client/features199ms300 Mi
111 Mi3236/api/client/features16ms3 Gi
411 Mi12815/api/client/features4.5ms14 Gi
817 Mi23207/api/client/features2.7ms26 Gi

Small Dataset (5 features (2kB))

$ hey -z 10s -H "Authorization: <frontend token>" http://localhost:3063/api/frontend`
CPUMemoryRPSEndpointp95Data transferred
0.14.3 Mi3673/api/frontend93ms9Mi
16.7 Mi39000/api/frontend1.6ms80Mi
46.9 Mi100020/api/frontend600μs252Mi
812.5 Mi141090/api/frontend600μs324Mi

and against our client features endpoint.

$ hey -z 10s -H "Authorization: <client token>" http://localhost:3063/api/client/features
CPUMemory observedRPSEndpointp95Data transferred
0.14 Mi3298/api/client/features92ms64 Mi
14 Mi32360/api/client/features2ms527Mi
411 Mi95838/api/client/features600μs2.13 Gi
817 Mi129381/api/client/features490μs2.87 Gi

This content was generated on