Back to Projects
Distributed Systems

DayTradingPlatform

Distributed Microservices Trading System

DayTradingPlatform screenshot

Overview

A distributed trading system demonstrating microservices architecture with separate services for authentication, trading, matching engine, and logging. Features a Go-based matching engine with price-time priority, gateway reliability patterns, and comprehensive performance testing.

The Problem

Building scalable, reliable trading systems requires understanding distributed systems, concurrency, transaction consistency, and performance under load. Traditional monolithic architectures struggle with these demands.

The Solution

Architected a microservices trading platform with API gateway, auth service, trading service, Go matching engine, and logging service. Implemented gateway patterns (JWT, rate limiting, circuit breaker), transactional consistency, and load-tested with JMeter to identify and fix bottlenecks.

Key Features

Microservices: API Gateway, Auth, Trading, Matching Engine, Logging
Go matching engine: price–time priority (FIFO), market/limit orders
Partial fills and auditable transaction logs
JWT authentication and authorization
API rate limiting and circuit breaker patterns
Transactional database writes for consistency
Caching layer (Redis) and event streaming (RabbitMQ)
React/TypeScript frontend for trading UI
JMeter load testing and performance optimization

Technical Highlights

  • Built matching engine in Go: implemented price-time priority and order matching logic
  • Gateway reliability: JWT validation, rate limiting, circuit breaker for fault tolerance
  • Performance tuning: DB connection pooling, query optimization, caching strategies
  • Load testing with JMeter: identified bottlenecks, improved throughput by 3x
  • Docker Compose orchestration for local multi-service development

Tech Stack

GoPythonFlaskDjangoPostgreSQLDocker ComposeRedisRabbitMQJMeterReactTypeScript

Lessons Learned

  • Distributed systems patterns: service decomposition, inter-service communication, data consistency
  • Concurrency in Go: goroutines, channels, and race condition handling
  • Performance optimization: profiling, database indexing, connection pooling, caching
  • Reliability patterns: circuit breakers, retries, graceful degradation
  • Load testing methodology: establishing baselines, identifying bottlenecks, iterative improvements

Interested in learning more?

Let's discuss this project and how my experience can benefit your team.