A biotechnology company runs computational workflows that simulate molecular interactions. The simulations must be processed in the exact chronological order in which they are submitted to ensure data dependency integrity. Each simulation takes between and hours to execute. The simulation requests are highly irregular, with dozens of submissions occurring simultaneously followed by days of complete inactivity. The database must scale instantly to handle the write throughput when simulations complete, but must not incur compute costs during inactive periods. Which architecture is the most cost-effective and meets these requirements?
- Queue the jobs in an Amazon SQS FIFO queue, execute the simulations as Amazon ECS tasks on AWS Fargate, and store the output in an Amazon DynamoDB table configured with on-demand capacity.Answer
- BQueue the jobs in an Amazon SQS standard queue, execute the simulations as AWS Lambda functions, and store the output in an Amazon DynamoDB table configured with provisioned capacity.
- CQueue the jobs in an Amazon SQS standard queue, execute the simulations as Amazon ECS tasks on AWS Fargate, and store the output in an Amazon DynamoDB table configured with on-demand capacity.
- DQueue the jobs in an Amazon SQS FIFO queue, execute the simulations as Amazon ECS tasks on AWS Fargate, and store the output in an Amazon DynamoDB table configured with provisioned capacity.
Answer
Queue the jobs in an Amazon SQS FIFO queue, execute the simulations as Amazon ECS tasks on AWS Fargate, and store the output in an Amazon DynamoDB table configured with on-demand capacity.
The correct solution uses an Amazon SQS FIFO queue to enforce strict ordering of the jobs. For the compute layer, Amazon ECS on AWS Fargate is chosen because the simulation runtime of 1 to 2 hours exceeds the 15-minute limitation of AWS Lambda. Fargate is serverless and scales to zero, ensuring zero compute cost when idle. For the database, Amazon DynamoDB in on-demand capacity mode instantly scales to handle completion writes and avoids ongoing idle costs during periods of inactivity.
Step-by-Step Solution
Key Concept
Selecting cost-effective serverless compute and database capacity modes for irregular, long-running tasks requiring ordered processing.