Coins or accounts
Difficulty 3 of 5
Card payments settle into one merchant at 4,000 payments/s. Payments need p99 below 100 ms. The merchant reads its balance 20 times/s and needs a value no older than 5 seconds. Pick the ledger model.
Options
- Account model: one merchant balance row
- Coin model: each payment adds an unspent output
- Account model with an hourly netting job
Goals and limits
- p99 latency (Payments)
- under 100 ms
- Error rate (Payments)
- under 0.1%
- Data age
- under 5 s
- Monthly cost
- under 40 USD/mo
- Traffic
- 4,000 req/s
Concepts
How players did
Player results load from the server.