Hey Guys, The external REST service I am calling takes 35-50sec to respond. I am thinking of replacing API Gateway with an Application Load Balancer. I know it's not serverless and generates a monthly bill, but I can't find a way around 30sec timeout limit at APIG.
I am not sure if anyone has tried this yet but I have a couple of questions:
• Should I move all routes to ALB or just the ones which are getting timed out? Since I will be paying the ALB bill anyways does it make a difference?
• Should I try decoupling my API into 2 parts? It's basically a booking service. Instead of sending a req and waiting for 35-55 sec, Should I submit a job and poll for status from UI like every 10 seconds?
◦ APIG calls lambda which pushes input to SQS and returns a polling ID
◦ SQS calls the consumer lambda, which calls external service, and writes data to DB against polling ID.
◦ Another APIG route takes polling ID and checks if the record is available in DB.