Interactive: Prefetch Calculator

Interactive: Prefetch Calculator

animation
amqp
protocols
messaging
Try Change Average processing time (sec) from 45 to 10.
Observe Watch Recommended Prefetch Count and System Capacity as average processing time changes from 45 seconds.
Explain Explain why prefetch=1 follows from the target latency and average processing time.

Technical boundaries. Prefetch uses max(1, ceil(target_latency / avg_processing_time)). High prefetch risk assumes prefetch=10 and 20% slow consumers; total throughput uses average processing time and number of consumers.

NoteInteractive: Prefetch Calculator

Key Takeaway: The optimal prefetch count depends on your target latency and processing time. For most competing consumer scenarios with variable processing, prefetch=1 is the safest choice. Higher prefetch values are only beneficial when processing times are consistent and you need to hide network latency.

Back to the chapter