PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

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.

21 Comments on “Why is SQS an appropriate service for this scenario?

  1. JM says:

    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.




    0



    0
  2. Kelvin Wong says:

    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




    5



    0
  3. kirrim says:

    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.




    2



    0
    1. kirrim says:

      (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”)




      0



      0
  4. Sudhir R V says:

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




    0



    0
  5. Majid says:

    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.




    0



    0

Leave a Reply

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