The caller's timeout must be shorter than the callee's
If your service times out at 30 seconds and the API it calls also times out at 30, the upstream gives up first and you spend the last second doing nothing useful, then return an error the client has already stopped waiting for.
client → gateway 10s → service 8s → database 5sEach hop shorter than the one before it. Then a timeout fails at the layer that can still do something about it.
httpreliability