Skip to content

Handle approximately 60,000 RPS with latencies consistently under 15 microseconds. Utilizing gRPC, ring-buffer and robust leader.

Notifications You must be signed in to change notification settings

gc-garcol/cafe-exchange

Repository files navigation

Cafe Exchange

Note: This project is still under development.

Overview

Stacks

  • Cafe ringbuffer
  • Agrona real-logic

Benchmark

Compared to Binance, this project demonstrates superior performance in both throughput and latency.

img.png

Quick start

  • Setup dev
make setup-dev
  • add --add-opens java.base/java.nio=ALL-UNNAMED to the JVM arguments

  • Run cluster

make run-cluster PORT=8080 GRPC_PORT=9500
make run-cluster PORT=8081 GRPC_PORT=9500
make run-cluster PORT=8082 GRPC_PORT=9500
  • Run client
./gradlew :exchange-client:run-client -Pport=8090
  • Run benchmark
./gradlew :benchmark-cluster:run-benchmark -Pport=8095

Client Swagger: http://localhost:8090/swagger-ui/index.html

Schema reference

About

Handle approximately 60,000 RPS with latencies consistently under 15 microseconds. Utilizing gRPC, ring-buffer and robust leader.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published