Your company runs an online 3D Printing E-commerce site where users can either select or upload their designs and provide the necessary details.
After the payment, the order goes to the production system.
The application uses the SQS FIFO queue to decouple the payment from the main printing job.
Once the payment information is successfully received, the system sends the job request to the SQS FIFO queue consumed by the spot EC2 instances configured with Auto Scaling.
The spot instances prepare the print job and submit it to the queue responsible for the printing.
The instances need to wait for the printing job to finish before finishing the message processing.
Due to the possibility of complex designs, the rendering job may take a while to finish.
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answers: B.
Option A is incorrect because the spot instances are not the issue, as the question does not mention that the instances are terminated.
Option B is CORRECT because this method can increase the timer for the instances to process the message so that the messages will not return to the queue again.
Option C is incorrect because the spot instances do not cause the issue.
Changing the instances to on-demand ones will not help.
Option D is incorrect because it takes longer to process the messages.
But they are still processed successfully.
A dead-letter queue does not help.
The 3D Printing E-commerce site uses the SQS FIFO queue to decouple the payment from the printing job. After the payment is received, the job request is sent to the SQS FIFO queue, which is consumed by the spot EC2 instances configured with Auto Scaling. The spot instances prepare the print job and submit it to the queue responsible for printing. However, the rendering job may take a while to finish, and the instances need to wait for the printing job to finish before finishing the message processing.
Option A - Increase the price reserved by the spot instances and make sure that AWS does not terminate the spot instances. This option is not recommended since increasing the price reserved by the spot instances can result in higher costs, and it does not address the issue of waiting for the printing job to finish.
Option B - Increase the visibility timeout of the SQS queue. This option is a possible solution. By increasing the visibility timeout, the spot instances have more time to process the messages before they become visible again in the queue. However, this may not solve the issue entirely if the rendering job takes a long time to finish.
Option C - Modify the Auto Scaling group to use on-demand instances instead of spot instances. This option is not recommended since using on-demand instances can result in higher costs. Also, it does not address the issue of waiting for the printing job to finish.
Option D - Configure a dead-letter queue for the messages that are processed unsuccessfully. This option is not related to the issue of waiting for the printing job to finish.
In conclusion, the best option in this scenario is to increase the visibility timeout of the SQS queue to allow the spot instances more time to process the messages before they become visible again. However, this solution may not solve the issue entirely if the rendering job takes a long time to finish.