← 返回 nvidia 的题目列表Real-Time Fraud Detection System
类型:qbank
Design a real-time fraud evaluation system for millions of daily transactions, 10,000+ requests per second, 50 ms decision latency, and zero-downtime ML model updates. Black Friday-style bursts and transaction success rate are explicit follow-ups.
Requirements
Design a service that evaluates every transaction in real time and returns one of:
Approve.
Flag for review.
Block.
Constraints:
Millions of transactions per day.
10,000+ requests per second.
50 ms latency budget for the decision path.
ML model updates must happen without downtime.
Promotional spikes such as Black Friday must preserve both throughput and transaction success rate.
Functional components:
Synchronous scoring API.
Feature lookup / feature computation.
Model inference service.
Rules / threshold layer for hard blocks and overrides.
Async logging and audit trail.
Model registry and rollout system.
Notes
A strong design keeps the critical path short:
client -> API gateway -> fraud scorer -> feature cache -> model server -> decision
|-> async event log / monitoring
Key design decisions:
Precompute hot features and store them in a low-latency feature cache; avoid joining large history in the 50 ms path.
Use model versioning with canary / shadow rollout. Keep old and new model versions loaded so rollback is instant.
Separate hard business rules from model score so compliance and risk teams can override safely.
Degrade gracefully under spikes: feature fallback, lower-cost model, queue only non-critical enrichment, fail-open or fail-review depending on risk policy.
Monitor p50 / p95 / p99 latency, approval rate, block rate, false-positive review rate, model drift, and feature freshness.
The trade-off is accuracy vs latency. A deep model with online feature joins may improve recall but break the 50 ms SLA; a two-stage design can use a fast model synchronously and a heavier async model for review routing.
Preparation
Practice drawing the latency budget across API, feature fetch, inference, and logging.
Prepare an answer for model update without downtime: registry, version pinning, canary, shadow traffic, rollback.
Be explicit about Black Friday: autoscaling, load shedding for non-critical work, warm caches, and precomputed high-risk features.