PrepAway - Latest Free Exam Questions & Answers

How should you implement such a system?

Your application provides data transformation services. Files containing data to be transformed are first
uploaded to Amazon S3 and then transformed by a fleet of spot EC2 instances. Files submitted by your
premium customers must be transformed with the highest priority. How should you implement such a system?

PrepAway - Latest Free Exam Questions & Answers

A.
Use a DynamoDB table with an attribute defining the priority level. Transformation instances will scan the
table for tasks, sorting the results by priority level.

B.
Use Route 53 latency based-routing to send high priority tasks to the closest transformation instances.

C.
Use two SQS queues, one for high priority messages, the other for default priority. Transformation instances
first poll the high priority queue; if there is no message, they poll the default priority queue.

D.
Use a single SQS queue. Each message contains the priority level. Transformation instances poll high-priority
messages first.

Explanation:

15 Comments on “How should you implement such a system?

  1. T says:

    D

    C is wrong because SQS does NOT guaranty priority. And 2 SQS also do NOT guaranty priority. You must include priority information inside the message itself.




    0



    1
    1. T says:

      Sorry, guys.
      D seems to be wrong. Instances can not poll high-priority messages first, they just poll and can determine priority only after message receiving.
      Why not A? (I still have some doubts about C, A should work)




      0



      0
  2. vladam says:

    B is not the right answer because transformation instances are not running all the time since they are spot instances.

    C is a good option, however you need to take SQS message retention into account:
    http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MessageLifecycle.html

    “SQS automatically deletes messages that have been in a queue for more than maximum message retention period. The default message retention period is 4 days. However, you can set the message retention period to a value from 60 seconds to 1209600 seconds (14 days) with SetQueueAttributes.”




    2



    0
  3. raj says:

    C is the right answer

    Work Queues: Decouple components of a distributed application that may not all process the same amount of work simultaneously.
    Buffer and Batch Operations: Add scalability and reliability to your architecture, and smooth out temporary volume spikes without losing messages or increasing latency.
    Request Offloading: Move slow operations off of interactive request paths by enqueing the request.
    Fanout: Combine SQS with Simple Notification Service (SNS) to send identical copies of a message to multiple queues in parallel.
    Priority: Use separate queues to provide prioritization of work.
    Scalability: Because message queues decouple your processes, it’s easy to scale up the send or receive rate of messages – simply add another process.
    Resiliency: When part of your system fails, it doesn’t need to take the entire system down. Message queues decouple components of your system, so if a process that is reading messages from the queue fails, messages can still be added to the queue to be processed when the system recovers.




    0



    0

Leave a Reply

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