How scale a Elasticbeanstalk application worker on

2019-09-06 04:05发布

问题:

I have a Scala application to do some heavy calculation based on customer_id, I'm putting customers id in SQS (Amazon Simple Queue Service), the application it is configured on ElastikBeansTalk to consume msg from SQS.

I would like to scale my application based on message coming from SQS, the problem is my application is running as HTTP server and it return 200 code after finishing the calculation, which minimum takes 15min.

SQS max timeout is 60 seconds, so after that, all msgs ended up in Dead Letter queue, I tried to send a 200 response code before finishing the calculation, but it receives another message from the queue and starts another process.

Any solution, please ?

EDIT: example of my worker configuration:

Thank you in advance !

回答1:

The max VisibilityTimeout is 12 hours. So you could put it to 30 minutes and that should cover your case.



回答2:

Well, the issue is not from Akka HTTP Server or either from SQS,it's coming from default nginx conf. Issue resolved by editing the default proxy_read_timeout which 60s to the value desired.