A containerized stock trading platform built to endure high-throughput, real-world simulation; sustaining over 17,000 concurrent users under load. The system executes market and limit orders via a custom FIFO matching engine, ensures atomic transaction integrity, and scales through Docker-managed microservices.
Performance bottlenecks were addressed through targeted JMeter stress testing, Redis-based concurrency control, and HAProxy-NGINX experimentation. Complexities like VM crashes, mutex race conditions, and HTTP timeouts were resolved through iterative refactoring and architecture rollback strategies.
| Simulated Users | Error Rate |
|---|---|
| 1,000 | 0.00% |
| 10,000 | 3.94% |
| 12,000 | 6.07% |
| 15,000 | 8.70% |
| 17,000 | 14.04% |
Result for 17k Users: 14.04% Error
Result for 15k Users: 8.70% Error
Result for 15k Users: 6.07% Error
Port:
4000
git clone https://github.com/danigallegdup/Stock_Trading_App
cd Stock_Trading_Appdocker compose up -d --buildcd TestRun3
nano Config/stockIds.csv
# Ensure it's empty
# CTRL+O to save, CTRL+X to exitThen initialize baseline stocks:
jmeter -n -t ./InitialSetup.jmx🔍 Verify
Config/stockIds.csvhas no extra lines before proceeding.
HEAP="-Xms1g -Xmx4g -XX:MaxMetaspaceSize=256m" \
jmeter -n -t test17k.jmx -l 17k_results.log -e -o 17k_resultsView detailed test results:
17k_results/index.html
docker compose down -v