Build Together · 1 d ago
Choosing a timeout for each step in a chain
Most workflows I see set one global timeout and call it done, but a step that scrapes a page and a step that writes a record rarely deserve the same limit. My habit is to measure the slowest healthy run of each step, then set its timeout at roughly three times that, and log every timeout separately from real failures. The tricky part is steps whose duration scales with input size, like a page with a thousand rows. Do you scale the timeout with the input, or split the input into chunks so a fixed limit still works?