month; get more cash-back next month ◦ 50 txn ≥100 yen and/or ≥100,000 yen total value ◦ 0.5% → 1% → 1.5% • Original campaign 2020-04-01 ~ 2021-07-31 What is PayPay Step? Counting period Effective period
Aggregated as needed ▪ User’s transaction count (≥100 yen) & value for target month ◦ Always up-to-date – but heavy load on DB Original Architecture 1 2
to support 10,000+ RPS for status API ◦ Need to be able to scale out • Aggregation of transactions when viewing status ◦ Heavy DB query • Still keep near real-time ◦ Users should see their purchases being reflected ◦ Just caching results would cause lag Problem Statement
each step ◦ All events of transaction have its full history for filling gaps ▪ E.g. Created → Completed → Refunded ◦ Daily monitoring batch • At most once ◦ Deduplicate with transaction table Exactly-once Processing
Two-month campaigns ◦ Count and effective periods overlap • Old and new campaign side by side ◦ Versioning of results during batch – aggregate for both versions ◦ Campaign configured with desired version Campaign Rule Changes July August September Counting v0 v1 v1 Effective v0 v0 v1
processing • Reached scalability goals ◦ 10,000+ RPS for read ◦ Near real-time aggregation ◦ Robust, future-proof foundation • The campaign is running ◦ Check it out! Outcome