Real-time at market peaks: building the platform behind xBratAI
xBratAI sends AI-generated day-trading signals for crypto, forex, futures and stocks to its subscribers. We built and run the platform behind it. Three requirements shaped almost every decision.
1. Fresh means pushed, not polled
A signal that arrives a minute late can be worse than no signal at all. So nothing in the platform waits for the user to ask. When a signal arrives, it is processed and pushed straight to every connected browser and app over a WebSocket connection, and the mobile app can notify the phone as well.
The backend is built from one Java and Spring Boot code base but deployed as separate services: signal processing, notifications, real-time delivery and user management. Each can be scaled and updated on its own, so a busy signal service never slows down a login.
2. Scale up for the peak, down for the night
Markets are not busy all day. Load comes in bursts around openings, news and volatility. Sizing servers for the peak means paying for idle machines most of the time.
The platform runs on Kubernetes on Hetzner Cloud, and every service scales automatically between two and ten instances depending on load. Two is the floor, so there is always a second instance if one fails. Ten is the ceiling, so a runaway cannot run up the bill.
3. Every change goes the same way
With traders relying on the signals, a release must never be an adventure.
- Infrastructure as code. The clusters, networks and cloud resources are described in code and created from it, so an environment can be rebuilt instead of repaired by hand.
- GitOps. What runs in the cluster is exactly what is in the repository. A deployment is a reviewed change, and going back is reverting it.
- Secrets stay out of the code. Passwords and keys live in a key vault and are injected at runtime.
- Four environments. Development, test, pre-production and production, so every feature is proven twice before a trader sees it.
One product, three front doors
Traders use xBratAI on the web, on Android and on iOS. The web app is Angular; the mobile apps are one Flutter code base for both platforms. All three receive the same signals over the same real-time channel.
The takeaway
Real-time products are less about clever code than about removing waiting: no polling, no manual deployment steps, no servers sized by guesswork. If you are planning something where seconds matter, we would be glad to help.
Read the full xBratAI case study.
Want to talk it through?
We are happy to discuss your software questions.