A development team is deploying a worker application to an AWS Elastic Beanstalk Worker Tier environment. The application processes high-compute tasks received from an Amazon SQS queue, with each task taking approximately minutes ( seconds) to complete. During testing, the team notices that tasks are frequently reprocessed by different worker instances before the original instance completes them, and the worker daemon logs indicate timeout failures before the application returns an HTTP status code. Which two configuration steps must the developer perform to resolve these issues and support this long-running processing requirement?
- Create a configuration file inside the `.ebextensions` directory with a `.config` extension, and set the `InactivityTimeout` parameter to in the `aws:elasticbeanstalk:sqsd` namespace.Cevap
- Create a configuration file inside the `.ebextensions` directory with a `.config` extension, and set the `VisibilityTimeout` parameter to in the `aws:elasticbeanstalk:sqsd` namespace.Cevap
- CCreate a configuration file inside a folder named `ebextensions` (without a leading dot) at the root of the source bundle, and set the `InactivityTimeout` parameter to in the `aws:elasticbeanstalk:sqsd` namespace.
- DSet the `VisibilityTimeout` of the SQS queue to seconds in the Amazon SQS console to ensure that failed processing attempts are quickly retried by other workers.
- EConfigure the environment's deployment policy to Rolling to automatically adjust the Amazon SQS queue's connection pool and visibility timeout during periods of high resource utilization.
Cevap
Create a configuration file inside the `.ebextensions` directory with a `.config` extension, and set the `InactivityTimeout` parameter to in the `aws:elasticbeanstalk:sqsd` namespace; and create a configuration file inside the `.ebextensions` directory with a `.config` extension, and set the `VisibilityTimeout` parameter to in the `aws:elasticbeanstalk:sqsd` namespace.
In an Elastic Beanstalk worker tier environment, the local daemon (`sqsd`) retrieves messages from an SQS queue and posts them to the application. If processing takes minutes ( seconds), the daemon must wait longer than the default seconds for the HTTP response. Increasing `InactivityTimeout` in the `aws:elasticbeanstalk:sqsd` namespace to seconds prevents premature HTTP timeouts. Concurrently, increasing the `VisibilityTimeout` in the same namespace to seconds keeps the message hidden from other instances while the worker processes it, preventing duplicate processing.
Adım Adım Çözüm
Anahtar Kavram
AWS Elastic Beanstalk Worker Tier Daemon Configuration