Wiki: Real-time Market Event Notifications: Plus500’s Scalable Fanout Architecture
For agents: Markdown version · Wiki index · Explore
- Speaker: Gal Barak
- Event: Reversim Summit 2024
- Video: https://www.youtube.com/watch?v=2SLUiD4Xc1E
- Transcript: /transcripts/2024/04-2SLUiD4Xc1E.md
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: Scalability, Microservices, Databases, Product Management
Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.
Summary
The speaker describes the architectural evolution of a notification system designed to handle real-time market event alerts for millions of financial trading customers. Initially built as a monolith, the system faced severe bottlenecks and cascading failures when handling sudden surges of millions of immediate notifications during major stock market movements. Through strategic refactoring, including separating read and write responsibilities, implementing data partitioning for hot and cold storage, and decoupling delivery channels, the speaker’s team successfully scaled the architecture. The audience learns how to adapt system design to meet extreme throughput and low-latency requirements without sacrificing reliability.
Key points
- 4:07 The speaker explains the decision to build an in-house notification system rather than using a third-party service to meet strict regulatory and custom business requirements.
- 7:21 The initial architecture was built as a stateless, multi-instance monolith using a message broker for asynchronous operations.
- 11:35 The introduction of market event notifications created a massive volume of immediate messages that overwhelmed the initial architecture and caused cascading failures.
- 16:51 The team adopted the CQRS pattern, separating the read service from the write and fanout services to break the self-feeding load loop.
- 18:23 As database tables grew to billions of rows, the database became a bottleneck, requiring a split into hot storage and cold storage.
- 19:28 The notification tables were further broken down per content type and channel to speed up write operations and allow parallel processing.
- 20:33 The current architecture successfully delivers 10 million notifications within seconds of a market event with 75% sent in under a second.
Takeaways
- Design notification systems in-house when facing strict regulatory compliance and complex customization needs.
- Separate read and write paths using CQRS to prevent high write loads from blocking read operations.
- Implement data partitioning, such as hot and cold storage separation, to keep transactional tables performant at scale.
Questions this talk answers
- How can you architect a notification system to handle sudden spikes of millions of real-time messages?
- When should you split a monolithic service into CQRS and separate read/write paths?
- How do you manage database growth and maintain query performance when dealing with billions of log or notification records?
Technologies
SQL Server, GCP
Tags
cqrs, database partitioning, fintech, high throughput, scalable architecture, system evolution