Transforming a Legacy Betting Platform
Brand: Not Disclosed
Industry: Sport Betting
Technologies: Erlang, DynamoDB, Kafka, AWS, Docker, Kubernetes, RESTful APIs
Partnership: 2022 - Present




Overview
Our client is a leading online gaming and sports betting platform offering sports, casino games, live casino, virtual sports, and lotteries. Known for its user-friendly interface and innovative products, the company emphasizes secure and reliable experiences for both casual and professional players.
The platform faced rising cloud costs, high CPU usage, and long startup times caused by inefficient processes and in-memory storage of customer limit data.
The Challenge
Key challenges included:
-
Excessive In-Memory Load: 32 GB of RAM dedicated to customer limit data
-
Inefficient Scheduling: Dedicated scheduler per customer limit, generating up to 200,000 processes monthly
-
Prolonged Startup Time: Application load took over 20 minutes
-
Operational Inefficiency: High CPU usage and slow responsiveness impacting user experience
The business goal was to reduce cloud costs, optimize system performance, and improve scalability while maintaining reliability.
The Solution
Our team implemented a series of targeted optimizations:
-
Optimized Data Storage with DynamoDB and Caching:
Replaced in-memory storage with Amazon DynamoDB for customer limit data, integrated with a caching layer using a prebuilt Erlang library for faster access and reduced database interactions.
-
Streamlined Scheduler Logic:
Refactored schedulers to activate only for limits expiring within the next hour. A custom solution proved 10x more cost-effective than AWS EventBridge Scheduler.
-
Enhanced Application Startup:
Eliminated the need to preload customer limits in memory, reducing startup time from 20 minutes to under 1 minute.
-
Advanced Monitoring & Logging:
Implemented real-time monitoring and logging solutions for proactive performance insights and quick issue detection.
-
Kubernetes Architecture:
Adopted Kubernetes to improve scalability, manageability, and infrastructure efficiency, enabling flexibility for future growth.
-
Legacy Code Refactoring:
Ongoing refactoring and documentation for maintainable, optimized, and scalable systems.
Tech Stack
Business Impact
Within three months, the platform achieved measurable improvements:
-
Reduced Downtime: From 2–3 occurrences/week to 1–2/month, targeting 99.9% uptime
-
Enhanced Job Processing: 70,000 messages processed in 10 minutes vs. 35,000 in 3 hours
-
Optimized Request Loading: Request times reduced from 5 minutes to under 2 seconds
-
Memory Usage: Reduced in-memory load from 32 GB to 1.6 GB (20x reduction)
-
Cloud Cost Optimization: Achieved a 30% reduction in AWS costs
-
Scheduler Efficiency: Active processes reduced from 200,000 to 80,000/month (60% CPU load reduction)
-
Faster Startup: Application load improved from 20 minutes to under 1 minute
These improvements enabled the client to scale efficiently, reduce operating costs, and deliver a faster, more reliable experience for users.
</ Web Development Tools >

React

Node.js

Erlang

Angular
How did you reduce the platform’s memory usage from 32 GB to 1.6 GB?
We migrated customer limit data from in-memory storage to Amazon DynamoDB, combined with a caching layer using an Erlang library. This approach reduced database interactions, optimized memory consumption, and achieved a 20x decrease in in-memory load.
What was done to cut the application startup time from 20 minutes to under 1 minute?
By eliminating the need to preload customer limits into memory, we streamlined the initialization process. The system now loads data on demand, which drastically reduced startup time and improved overall responsiveness.
How were cloud costs and CPU load optimized?
We refactored scheduler logic so that processes only activate for limits expiring within the next hour. This reduced active processes from 200,000 to 80,000 monthly, cutting CPU usage by 60% and enabling a 30% reduction in AWS cloud costs.
How does the new architecture ensure scalability and reliability for future growth?
The platform now runs on Kubernetes for flexible scaling and better infrastructure management. Combined with advanced monitoring, logging, and ongoing code refactoring, the system is more maintainable, resilient, and ready for continuous expansion.









