I'm trying to wrap my head around network timeouts and how they should be set for each hop of a given request. For simplicity, I'm not looking at a breakdown of connect vs. read vs. write timeouts and will assume "timeout" means "max allowed total time from first packet received to last packet sent (or vice-versa for the client). Say I have the following hops in my request flow:
(client) --> (AWS ALB) --> (nginx) --> (server)
…and let's assume that my server is set up to timeout after 10 seconds.
My question: what would be a valid set of timeouts for every hop? Would it be
// A
(client, 13s) --> (AWS ALB, 12s) --> (nginx, 11s) --> (server, 10s)
or
// B
(client, 7s) --> (AWS ALB, 8s) --> (nginx, 9s) --> (server, 10s)
or (C) something else?
Obviously, I'm also interested in the logic behind your suggestions.