Feature refresh interval

  • Tune
  • Model 18

Difficulty 4 of 5

A fraud model reads a card velocity feature 4,000 times/s. A cached value is recomputed from the event database when it expires. The model loses its gain when the value is older than 30 s. Keep p99 under 150 ms and cost under 60 USD/mo. Tune the cache TTL and the database vCPU.

Play level

RedisSQLPartner apps4,000 req/sAPI server2 vCPU · 2 GBRedis cache1 vCPU · 2 GBPostgres2 vCPU · 4 GB
HTTP/2RedisSQLPartner apps4,000 req/sAPI server2 vCPU · 2 GBRedis cache1 vCPU · 2 GBPostgres2 vCPU · 4 GB
The board at the start of the level
Each worker adds one network cardDrag or use arrow keys to change the workers

2 workers · 1 TB moves in 1.1 h · 1,000 Mbps per card

Goals and limits

p99 latency
under 150 ms
Error rate
under 0.1%
Data age
under 30 s
Monthly cost
under 60 USD/mo
Traffic
4,000 req/s

Concepts

How players did

Player results load from the server.