Tente resolver a tarefa antes de consultar os critérios. Compare o resultado e explique o que mudou no seu raciocínio.
Task, 20 minutes: design a notification service receiving 864,000 events/day. Assume a peak 10 times the average, a 400-byte stored payload per event, and 200ms average processing time at the peak. Calculate average and peak arrival rates, daily raw payload storage, and steady-state work in flight. Then assume workers process nothing during a 15-minute outage while 100 events/second keep arriving. After recovery, workers process 200 events/second while arrivals remain at 100/second. Calculate the accumulated backlog and its drain time. Draw acknowledgment and retry boundaries. Clearly separate supplied assumptions from measurements you would need.
Check your work:
- Average arrival rate is 10 events/second and assumed peak is 100. Raw payload storage is 345.6 MB/day in decimal units, before indexes, metadata, replication, and retention.
- At 100 events/second and 0.2 seconds average processing time, steady-state work in flight is about 20.
- A 15-minute outage at a sustained 100 events/second accumulates 90,000 events. If recovery processes 200/second while 100/second keep arriving, draining that backlog takes another 15 minutes.
- Draw acknowledgment and retry boundaries. Describe durable storage, deduplication, and how failed messages stop retrying indefinitely.
Follow-up: propose an alert on backlog age, not only queue length, and explain what users see while delivery is delayed. A queue absorbs a burst but cannot repair a permanent capacity deficit.
No app, a tarefa fica visível e você pode revelar os critérios depois da tentativa. Use as notas para registrar sua solução.
Praticar este exercício no app