Score:1

How to reduce the time it takes a request to pass from a ALB to the actual Fargate Server?

in flag

I have a webhook endpoint where our service provider send a payload which I have to respond to within 2 seconds. I've been getting way too many timeout errors from the service provider, meaning I wasn't able to respond within 2 seconds.

I did some digging as to when the Fargate Server gets the payload vs when the ALB receives it. I went through some of the access logs from the ALB and found that it takes about a second or so to pass the payload from ALB to the fargate server.

Here's the timestamp at which the request arrived to the ALB - 15:19:20.01 and my server recieved it at - 15:19:21.69.

There's over a second of difference, I wanna know how to reduce it. One of the solution I thought of was that instead of registering my domain + the URI to the service provider to send webhook to, I set my IP + the URI so there's no need of forwarding done by ALB.

Let me know what you guys think.

EDIT - The solution I thought of was pretty stupid because fargate provides a new IP everytime a new task is deployed (as far as I know). Also the ALB forwards the request / payload to the ECS Target Group, just throwing this fact in as well.

djdomi avatar
za flag
are you using hostnames and a remote resolver? it could be a dns issue in that case
Sahil avatar
in flag
hey, I was going through my ALB logs and found that the `request_processing_time` for ALB is 0.001 which is perfect but `elb_status_code` is 460, and from the documentation [here](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-460-issues), its because of the fact that "the client closed the connection with the load balancer before the idle timeout period elapsed.". I don't know how to fix that, maybe I'll contact my service provider and what their timeout for connection is? Not sure honestly.
djdomi avatar
za flag
I would always suggest first contact the service provider with a ticket before trying to assk on a public Q&A site imho
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.