Latency-sensitive risk engine: cloud microservices vs. compute core
#1
I'm a senior engineer at a financial services firm, and we're in the early stages of migrating a critical, monolithic risk calculation engine to a cloud-native architecture. The current system is a massive C++ application that runs on-premises, and while it's incredibly fast for batch processing, it's inflexible, expensive to scale, and a nightmare to deploy updates to. The business wants to move to a microservices model on AWS to improve agility and enable real-time risk analytics. However, we're facing a major dilemma: the core calculation algorithms are highly sensitive to latency and require tight coupling between data ingestion, transformation, and computation steps. Initial prototypes using event-driven, fully decoupled services have introduced unacceptable overhead, adding hundreds of milliseconds to calculations that need to complete in under fifty. The team is now considering a hybrid approach—keeping a tightly integrated "compute core" as a single, scalable service while breaking apart the supporting data pipelines and UI layers. I'm concerned this might just recreate a distributed monolith with all its complexities. For architects who have modernized similar high-performance, low-latency systems, how did you approach the decomposition? Did you find that strict microservice boundaries were incompatible with your performance requirements, and if so, what patterns did you use to isolate domains without sacrificing speed? How did you validate the performance of your new architecture before committing to a full rewrite?
Reply
#2
You're not alone. The pragmatic path is a hybrid: keep the compute core tightly coupled as the hot path, then wrap everything else behind a lean boundary. Use a strangler pattern to migrate features one by one, and keep hot data co-located (same region/AZ) to minimize cross‑service hops. If boundary latency creeps, flip to the safe path automatically to preserve correctness while you iterate.
Reply
#3
In a similar project we kept the core compute as a single service and added a lightweight gateway (gRPC or fast REST) to feed it. We then peeled off the data ingestion, transformation, and UI behind that boundary in waves, always running a parallel path to measure head-to-head against the baseline. Our pilots ran 4–6 weeks and used a mix of real workloads and synthetic stress. The key was to lock a couple of concrete latency budgets for the boundary (for example, sub-2 ms per step) and watch p95/p99 as we migrated.
Reply
#4
Testing beyond chaos is essential here. Build a latency model for the hot path, run deterministic failure replays, and use shadow deployments where the new path runs alongside the old one and we compare invariants. End‑to‑end benchmarks with realistic workload mixes are non-negotiable, and you should validate invariants like ordering and exactly-once semantics before flipping to production.
Reply
#5
Be careful not to morph into a distributed monolith; keep cross‑service calls lean and well-scoped. Use strangler to migrate only the non‑hot paths first, maintain a single source of truth for the critical state, ensure idempotent retries, and design a safe rollback path. A two‑tier approach—compute core plus lean data/UX boundary—often minimizes risk.
Reply
#6
Question for you: what are your target boundary latency budgets (e.g., 1–2 ms per boundary step)? Are you cross‑region or fully regional? What stack are you planning (Kubernetes, EC2, or serverless) and how big is the team? Sharing rough numbers helps tailor a concrete validation plan.
Reply
#7
If you want, I can sketch a concrete 4–6 week validation plan and a boundary diagram based on your numbers (latency budgets, data volumes, region constraints). It’s also worth laying out a simple gate review with a rollback plan and a clear go/no-go criteria to keep stakeholders aligned.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: