How scale a Elasticbeanstalk application worker on

2019-09-06 03:35发布

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: enter image description here

Thank you in advance !

2条回答
来,给爷笑一个
2楼-- · 2019-09-06 04:06

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

查看更多
Melony?
3楼-- · 2019-09-06 04:13

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.

查看更多
登录 后发表回答