Skip to content

Part 10 — System Blueprint

BRE Runtime Architecture

The BRE runtime should behave like a deterministic computation service, not a workflow engine, database-backed report builder or hidden underwriting desk. It receives a complete input snapshot, chooses an immutable rule_version_id, evaluates precompiled artifacts and returns a decision object. LOS workflow owns state movement, credit workbench owns CAM judgement, LMS owns booked dues and DPD, and the co-lending module owns partner_share, escrow and DLG ledgers. The BRE computes policy and records its trace.

This architecture also keeps the regulatory story clean. RBI’s June 24, 2026 draft Guidance on Regulatory Principles for Model Risk Management expects model inventory, documentation, validation, approval, monitoring, change management, business continuity and decommissioning controls across all material models, including third-party and AI/ML models (RBI draft model risk guidance transcript). The runtime therefore has to support versioning, replay and audit by design.

ComponentResponsibilityNon-responsibility
Ruleset compilerConverts authored decision tables, expressions, scorecards and DRD metadata into immutable artifactsDoes not evaluate live applications
Artifact registryStores rule_version_id, artifact hash, effective dates, validation status and rollback pointerDoes not edit rules in place
Version pointer serviceResolves active ruleset for product, lender, channel and decision pointDoes not perform business evaluation
Stateless evaluator podsEvaluate input snapshot against precompiled artifact and return output plus traceNo per-request DB reads for rules; no hidden feature fetch
Feature snapshot serviceFreezes feature payloads from data-fetch DAG into encrypted object storageDoes not decide policy
Decision persistence adapterInsert-if-absent by idempotency key; returns stored decision on replayDoes not mutate application state
Trace storeStores per-node timing, rule-hit and hashed input/output recordsDoes not expose raw PII to broad roles

Compile on publish. A published artifact is immutable. Hot-swap uses a version pointer update, not pod restart or database row edits. Evaluator pods load current and recent artifacts into memory, watch for pointer changes, and keep old versions long enough to replay in-flight requests. This pattern supports commercial decisioning practice too: public Experian and Scienaptic material describes decision platforms with strategy testing, simulation, performance monitoring and versioned strategies, while FinBox distinguishes the decisioning layer from LOS workflow orchestration.

Data fetching happens before evaluation through a DAG owned by integrations and credit ops. The DAG produces the canonical request described in BRE functional specification.

Data nodeParallelizableGate conditionOutput
Dedupe and internal exposureYesPAN/GSTIN/mobile availableParty/group match, exposure, block flags
KYC and BO statusYesApplication parties createdparty_features, KYC completeness, screening status
Bureau pullYes after consentActive bureau consent and identifiersbureau_features, obligations, score/rank
AA/banking pullYes after consentActive AA or upload consentbanking_features, ABB, bounces, credits, EMI debits
GST/UdyamYesGSTIN/Udyam or consent availableTurnover, filing discipline, MSME status
Financial spreadNo for manual filesUploaded/audited/provisional financialsRatios, cash accrual, DSCR inputs
Collateral/valuationUsually asyncSecured product or collateral offeredLTV, legal status, insurance gaps
Partner/anchor feedYesPartner consent and program activeGMV, settlement, churn and seller status

Synchronous decision path: pre-screen, small-ticket eligibility, pricing and deviation classification where all mandatory data is present. Async enrichment: collateral legal opinion, field investigation, uploaded financial spreading, partner callbacks, third-party model fallback. The engine must return refer rather than block forever when a required async node is incomplete.

The numbers below are engineering targets for this reference architecture. They are not industry benchmarks and should be tuned after load testing.

Stagep50 targetp95 targetp99 targetNotes
Version pointer lookup2 ms8 ms15 msIn-memory cache with registry fallback
Input schema validation5 ms15 ms30 msJSON schema plus feature freshness checks
Rule/table evaluation15 ms50 ms100 msCPU-bound for typical SME rulesets
Scorecard/model node10 ms40 ms120 msLocal scorecard; external model excluded
Co-lending allocation computation5 ms20 ms50 msSplit, blended rate and partner verdict merge
Reason-code ranking5 ms20 ms50 msDeterministic ranker
Trace serialization10 ms40 ms100 msFull trace to queue or write-optimized store
Decision persistence15 ms60 ms150 msInsert-if-absent on idempotency key
End-to-end decision call80 ms250 ms600 msEngineering target after feature snapshot exists

For borrower-facing digital journeys, keep hard timeout at 1.5 seconds after snapshot creation. For credit workbench and batch monitoring, the timeout can be longer because human or portfolio processes absorb delay. Data-fetch SLAs are separate and usually dominate total elapsed time.

Rule evaluation is mostly CPU-bound once features and artifacts are in memory. Horizontal scaling is therefore straightforward: add stateless evaluator pods behind a load balancer, pin max concurrency per pod, and isolate heavy model nodes from basic rule tables if needed.

Scale dimensionEngineering targetDesign control
Per-pod simple evaluations300-800 eval/sec4 vCPU pod, preloaded artifacts, no rule DB read
Per-pod mixed evaluations100-300 eval/secScorecards, co-lending allocation and trace serialization included
Cluster burstHundreds to thousands eval/secHorizontal pod autoscaling on CPU, queue depth and p95 latency
Marketplace batch offers50,000-500,000 batch rows per runBatch workers, trace sampling for non-issued offers, full trace for issued offers
Interactive journey1 request per borrower actionStrict timeout, load-shed optional enrichment first

Load-shedding should preserve regulatory controls. Shed optional enrichment, simulation calls and non-critical trace analytics before shedding final decision persistence. If persistence is unavailable, return error and no borrower-facing approval. If monitoring batch is overloaded, queue with delay and alert policy_risk; do not silently skip EWS re-score.

SourceSuggested TTL engineering targetHard bound
Bureau report7-30 days by product policyConsent scope, CIC rules and lender policy
AA/banking24 hours for instant journey; 7 days for manual CAM if no new statement neededConsent expiry and statement end date
GST returnsUntil next filing cycle or 7 days for live fetchReturn period and consent
Udyam/KYC30 days for classification; current for KYC statusKYC risk and periodic review controls
Internal exposure5 minutes for pre-screen; real-time before sanctionInternal ledger source of truth
Anchor dataSame day for daily feed; minutes for real-time settlement feedProgram agreement and consent
Collateral valuationProduct policy, often 30-180 daysLegal/valuation validity and market movement triggers

Cache keys must include party_id, source identifier, consent id or scope, feature version, source timestamp and transformation version. Do not cache only by PAN or GSTIN. Use request coalescing and stampede protection for bureau, AA and GST pulls: the first request owns the fetch, concurrent requests wait or use permitted stale data with staleness flags.

The idempotency key is:

application_id + decision_point + input_snapshot_hash + rule_version_id

For co-lending, include cla_id and partner policy version when partner verdict is part of the output. For monitoring/EWS, use loan_account_id, decision point, snapshot date and rule version.

Exactly-once decision persistence uses insert-if-absent on idempotency_key. If a duplicate request arrives, return the stored bre_result_id and canonical output. Never run a new decision with the same key and overwrite the old trace. Application state movement stays with LOS. LOS applies optimistic locking against application.application_state and version: a decision computed for credit_in_review cannot move a file that has already become rejected, sanctioned or returned_for_rework.

Out-of-order callbacks from data providers are handled by snapshot versioning. If an AA callback arrives after a decision has been issued, it creates a new feature snapshot and optional re-evaluation task. It does not mutate the old decision. Concurrent re-evaluations are allowed only when their snapshot hashes differ, their rule versions differ, or their decision points differ.

Same snapshot plus same rule_version_id must reproduce the decision bit-for-bit. This is the core audit promise.

Forbidden nondeterminism:

PatternReplacement
Reading wall clock inside a ruleInject evaluation_timestamp as input
Random challenger assignment inside evaluatorPrecompute challenger bucket in caller or experiment service
Calling mutable reference dataVersion-pin reference data in snapshot
Floating-point financial math with runtime-dependent roundingUse decimal math and stored rounding mode
External model call without version/hashStore model version, feature vector hash and response hash
Rule reading current DB state mid-evaluationInclude required state in feature snapshot

Replay has two modes. Audit replay returns exact historical output using old artifact and snapshot. What-if replay uses historical snapshots with a new candidate ruleset and writes to a simulation namespace only. What-if replay must never create deviation, sanction_condition, partner_share or borrower-facing offers.

FailureRuntime behaviorAllowed degradation
Bureau provider timeoutData DAG retries with circuit breakerIf bureau is mandatory, return refer or provider_unavailable; do not approve with missing bureau
AA/GST provider unavailableQueue async enrichment and mark missing sourceCached-feature decision only if staleness policy permits
Artifact registry downContinue with in-memory active artifactsBlock publish and pointer changes
Version pointer conflictUse pointer resolved at request startPersist resolved rule_version_id in trace
Trace store slowPersist decision first, enqueue trace with back-pressureIf trace queue full, fail closed for sanction decisions
Decision DB unavailableNo final decision returnedCaller retries with same idempotency key
External model unavailableUse documented fallback scorecard only if approvedOtherwise refer
Co-lender partner verdict delayedReturn originator verdict plus partner pendingNo final co-lending sanction until both policy verdicts are resolved

Circuit breakers are per data provider and per endpoint. They maintain states closed, open, half_open, thresholds, retry-after timestamp and owner. Timeout policy must be shorter than borrower-facing SLA. Retries are safe because decision persistence is idempotent, data fetches carry provider request ids, and payment or booking side effects are outside the BRE.

SignalDimensionOwner
Decision volumeProduct, channel, decision point, ruleset versionpolicy_risk, engineering
Outcome mixApprove/refer/decline/error, reason codepolicy_risk, credit
Latencyp50/p95/p99 by stage and nodeEngineering
Rule-hit distributionRule id, score band, deviation severitypolicy_risk
Drift alertsFeature distributions, score bands, approval mix, bad-rate lagRisk analytics
Override rateRule outcome versus human final decisionCredit management, internal audit
Canary dashboardChampion/challenger version, split, stop-loss metricspolicy_risk
Co-lending mismatchOriginator verdict, partner verdict, split, booking agePartner ops and finance
Trace completenessFull trace present, snapshot hash present, PII policyCompliance and audit

Full trace retention is required for issued decisions and model governance. For high-volume pre-approved marketplace offers that are never shown to borrowers, retain aggregate metrics and sampled traces until the offer is issued; once an offer is displayed, preserve full trace. The trace sampling policy itself should be documented and reviewed.

BRE inputs include PAN, GSTIN, bureau data, bank transactions, financial statements, KYC, anchor data and sometimes collateral documents. Use encryption in transit and at rest. Secrets for bureau, AA, GST and partner calls remain in integration services, not evaluator pods. Evaluator pods receive normalized features, not provider credentials.

Access follows actors permissions:

RoleAccess
policy_riskRule definitions, aggregate traces, masked feature values, simulation data
credit_analystApplication decision output, reason codes and rule trace needed for CAM
credit_manager / national_credit_headDeviations, DoA routing, decision trace and approval context
partner_api_clientContracted status, partner verdict and borrower-facing reasons only
dsa_userCoarse status only; no hidden rule thresholds or bureau data
internal_auditorRead-only evidence export, masked unless approved audit purpose requires detail
system_adminPlatform administration, no business approval or unlogged export
OperationProcedure
Publish rulesetCompile, validate, simulate, approve, store artifact, update pointer atomically
CanarySend defined percentage or segment to challenger, with deterministic assignment outside evaluator
RollbackRepoint active version, keep failed version for audit, run impact replay
Scale outAdd pods; warm artifacts before receiving traffic
Disaster recoveryRestore artifact registry, pointer store, decision DB, snapshot store and trace store to consistent point
DecommissionMark ruleset/model inactive, preserve inventory and traces, remove from pointer service