System Architecture
Runtime Flow
Exact branching and processing behavior for track and referral ingestion.
/track Controller Decision
trackEvent behavior:
- if event is not
referral: process inline - if event is
referralwithout referral context: process inline - if event is
referralwith referrer + referred identity: queue job
Referred identity is detected from metadata keys including both camelCase and lowercase variants.
/sdk/referrals/apply Controller Decision
applyReferral behavior:
- with
referredUserId: process inline - with only
referredUserEmail: queue job
Worker Dispatch
processJob dispatches by job.name:
EVENT_PROCESS->sdkEventService.trackEventWithApiKeySDK_REFERRAL_APPLY->sdkReferralService.applyReferralWithApiKeyREWARD_PROCESS-> reserved placeholder response
Retry + DLQ
- Attempts: 5
- Backoff: exponential, delay 2000ms baseline
- Exhausted jobs are copied to dead-letter queue with payload + failure stack