Why is SQS an appropriate service for this scenario?

A company has a workflow that sends video files from their on-premise system to AWS for transcoding. They
use EC2 worker instances that pull transcoding jobs from SQS. Why is SQS an appropriate service for this
scenario?

A company has a workflow that sends video files from their on-premise system to AWS for transcoding. They
use EC2 worker instances that pull transcoding jobs from SQS. Why is SQS an appropriate service for this
scenario?

A.
SQS guarantees the order of the messages.

B.
SQS synchronously provides transcoding output.

C.
SQS checks the health of the worker instances.

D.
SQS helps to facilitate horizontal scaling of encoding tasks.



Leave a Reply 21

Your email address will not be published. Required fields are marked *


rickster81

rickster81

testlord gives answer D for this question

?!?!?!?

JM

JM

Imho the idea for SQS is to improve scalability.
Elastic Beanstalk is checking the health of EC2 instances, not sure if SQS does.
Therefore I vote for D.

Kelvin Wong

Kelvin Wong

Even it we are not sure, the process of elimination helps in this one

A – messages are out of order, not ordered
B – its a messaging system, not trancoding system
C – it does check help of external clients, its a pull system
D – only logical answer

jade

jade

Well played sir.

mr_tienvu

mr_tienvu

I choose C

Sandeep

Sandeep

B – I choose this option by a keyword “Horizontal Scaling”

donkeynuts

donkeynuts

that makes no sense haha

kirrim

kirrim

D is the only possible answer

A. SQS guarantees the order of the messages.

Not true, SQS does not guarantee the order of the messages at all. If your app requires messages be processed in a certain order, make sure your messages in the SQS queue have a sequence number on them.

B. SQS synchronously provides transcoding output.

Transcoding output would mean a piece of media (eg audio/video) that needs to be stored somewhere. Since media files are usually large binary data, this would probably be into S3 (and possibly metadata about the media file into DynamoDB, such as the S3 location, user/job that generated it, date/time it was transcoded, etc.) While S3 messages can accept binary data as a data type, you probably wouldn’t want to store a output media file as an SQS message because the maximum message size is 256KB, which would severely limit how large your transcoding output file could be. Also, the maximum retention time in an SQS queue is 14 days. In the unlikely case that you were willing to accept those limitations, you’d still be limited to a maximum of 120,000 messages in the queue, which would severely limit the amount of transcoding outputs you could store across those 14 days. This scenario just isn’t a good fit for an SQS queue. Drop your transcoding output files into S3, instead.

C. SQS checks the health of the worker instances.

SQS does not check the health of anything. If you’ve got a fleet of worker instances you want to monitor the health of, probably you’d want to have them in an auto-scaling group with a health check on the ASG to replace failed worker instances.

D. SQS helps to facilitate horizontal scaling of encoding tasks.

Yes, this is a great scenario for SQS. “Horizontal scaling” means you have multiple instances involved in the workload (encoding tasks in this case). You can drop messages indicating an encoding job needs to be performed into an SQS queue, immediately making the job notification message accessible to any number of encoding worker instances.

kirrim

kirrim

(Oops, typo on explanation for B being a wrong answer, “S3 messages can accept binary data as a data type” should have been “SQS messages can accept binary data as a data type”)

Sudhir R V

Sudhir R V

In a worker environment, It is Elastic Beanstalk which polls the Amazon Simple Queue Service (Amazon SQS) at least once every three minutes.

Majid

Majid

Answer is D

https://awsdocs.s3.amazonaws.com/SQS/latest/sqs-dg.pdf

Amazon SQS queues can deliver very high throughput (many thousands of messages per second). The key to achieving this throughput is to horizontally scale message producers and consumers. In addition, you can use the batching actions in the Amazon SQS API to send, receive, or delete up to 10 messages at a time. In conjunction with horizontal scaling, batching achieves a given throughput with fewer threads, connections, and requests than would be required by individual message requests. Because Amazon SQS charges by the request instead of by the message, batching can also substantially reduce costs.

noorani khan

noorani khan

answer is D since you can autoscale your workers

jade

jade

How many from this website are wrong? Answer is D.