logo

Peatio & Barong Public Endpoints Benchmark Guide

#Prerequisites

To have better insight into platform metrics, deploying Prometheus and Grafana beforehand is recommended.

#Benchmark

Benchmark

Suggested tool: Hey Number of clients: 1 x 20,000 request per second Example: hey -c 20000 -n 150000 http://envoy.example-namespace:10000/api/v2/peatio/public/markets Metrics to collect: Number of requests per second, CPU load chart, Latency per page chart

Endpoints
http://envoy.example-namespace:10000/api/v2/peatio/public/markets
http://envoy.example-namespace:10000/api/v2/peatio/public/markets/tickers
http://envoy.example-namespace:10000/api/v2/peatio/public/currencies
http://envoy.example-namespace:10000/api/v2/barong/resource/users/me
http://envoy.example-namespace:10000/api/v2/peatio/public/trading_fees
http://envoy.example-namespace:10000/api/v2/peatio/public/markets/btckrw/trades

#Results

All the tests were executed on a Kubernetes cluster of 12 nodes with 8 CPU cores and 16 GB of RAM each.

ComponentReplicas
Peatio24
Barong12
Envoy8

Every test was performed on a given API endpoint with a specific number of connections, producing the resulting requests per second.

For example, testing the /markets endpoint with 2000 connections resulted in 4337 requests per second.

API endpointNumber of connectionsRequests per second
/markets20004337.5128
/markets50004281.5957
/markets200002862.8619
/markets/tickers10008517.8458
/markets/tickers20009371.2538
/markets/tickers500012177.0153
/markets/tickers200008296.1285
/currencies20002711.7451
/currencies50002958.8832

Thus, the aforementioned infrastructure setup should be sufficient for most large-scale cryptocurrency exchange deployments.