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.

Component Replicas
Peatio 24
Barong 12
Envoy 8

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 endpoint Number of connections Requests per second
/markets 2000 4337.5128
/markets 5000 4281.5957
/markets 20000 2862.8619
/markets/tickers 1000 8517.8458
/markets/tickers 2000 9371.2538
/markets/tickers 5000 12177.0153
/markets/tickers 20000 8296.1285
/currencies 2000 2711.7451
/currencies 5000 2958.8832

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