Monaco Protocol v0.5.1
Note: These are historical release notes for v0.5.1 and describe the architecture as it shipped at that time. Redis (and its ElastiCache deployment) has since been removed. The current architecture is PostgreSQL (durable source of truth) + NATS JetStream (durable log and pub/sub fan-out) + an in-memory matching engine (DashMap). References to Redis below reflect the v0.5.1 design only.
Architecture Evolution
This release marks a significant evolution in Monaco’s infrastructure, transitioning from a monolithic API to a distributed microservices architecture designed for high-frequency trading workloads.High-Level Architecture
Microservices Breakdown
Path-Based Routing
All services are accessible through a single domain with intelligent path-based routing:Performance Architecture
The Monaco Speed Layer
Monaco achieves sub-millisecond order processing through a carefully designed dual-storage architecture:Latency Targets
Real-Time Data Streaming
WebSocket Architecture
The dedicated WebSocket service provides real-time market data with minimal latency:orderbook:{trading_pair_id}- Real-time orderbook updatestrades:{trading_pair_id}- Trade executionsuser:{user_id}- Private order updates
gRPC API (New)
Why gRPC?
Quick Start
Service Reference
Deployment Architecture
Container Orchestration
Each microservice runs as an independent ECS service with auto-scaling:Horizontal Scaling
- Stateless APIs: HTTP, WebSocket, and gRPC services scale horizontally
- Matching Engine: Partitioned by quote token for parallel processing
- Redis: ElastiCache cluster with read replicas
- PostgreSQL: RDS with read replicas for query scaling
Migration Guide
From v0.5.0
No breaking changes. The REST API remains fully compatible. New services are additive:- WebSocket: Now on dedicated service (improved reliability)
- gRPC: New option for latency-sensitive applications
Choosing Your API
What’s Next
- Streaming gRPC: Server-side streaming for real-time data
- FIX Protocol: Industry-standard trading protocol support
- Colocation: Reduced latency for institutional traders
For detailed API documentation, see the REST API or WebSocket API sections.

