Voting System for Popular TV Show

Build a Voting System for a Popular TV Show

Prev Question Next Question

Question

A company is building a voting system for a popular TV show.

Viewers watch the performances then visit the show's website to vote for their favorite performer.

It is expected that the site will receive millions of visitors in a short period of time after the show is finished.

The visitors will first login to the site using their Amazon.com credentials and then submit their votes.

After the voting is completed, the page will display the vote totals.

The company needs to build a site to handle the rapid influx of traffic while maintaining good performance.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

This scenario has the following architectural considerations: (1) the application needs to be scalable to handle traffic coming from millions of users, (2) the application should handle the rapid influx of traffic, maintaining good performance.

When the application needs to handle the data coming from millions of users, always think about using DynamoDB.

Also, to provide the global users with high-performance content access, you need to consider CloudFront.

You need to set the appropriate IAM Role for the front end/web servers to access DynamoDB tables.

Option A is incorrect because multi-AZ RDS is not a preferable solution compared to DynamoDB.Option B is incorrect because IAM roles should be used to provide permissions to write the DynamoDB table.

Option C is incorrect because DynamoDB needs a high write capacity unit.

With this option, DynamoDB may have a performance issue.

Option D is CORRECT because (a) it is highly scalable, (b) creates appropriate IAM Role to access the DynamoDB database, and (c) more importantly uses SQS to hold the user data/votes such that the application does not consume read and write provisioned capacity of DynamoDB.

As per the scenario, once the user completes the voting, the web page should display the total number of votes submitted online.

Option D also includes an Autoscaling group of EC2 instances to handle the traffic.

Hence option D is optimal.

The best answer for the company to build a site to handle the rapid influx of traffic while maintaining good performance is:

C. Use CloudFront and an Elastic Load Balancer in front of an auto-scaled set of web servers. The web servers will first login with the Amazon service to authenticate the user. The web servers will process the users' votes and store the votes into a DynamoDB table that has a large read capacity unit.

Explanation: The key requirements for this system are to handle millions of visitors and maintain good performance while ensuring security and reliability. The proposed architecture should be able to handle the expected traffic, provide a secure login process, and store user votes in a reliable and scalable way.

Option A suggests using CloudFront and an Elastic Load Balancer in front of an auto-scaled set of web servers. This approach can handle high traffic, but storing the votes in a multi-AZ Relational Database Service instance may not be the best choice since it could become a bottleneck in the system. Furthermore, this option doesn't address how to authenticate users before processing their votes.

Option B suggests using CloudFront and the static website hosting feature of S3 to serve the website and calling the login with Amazon service to authenticate users. While this approach can also handle high traffic, storing user votes in DynamoDB would be a better choice since DynamoDB is a highly scalable, NoSQL database service. However, using IAM users to gain permissions to a DynamoDB table can be complex to manage and maintain, especially when dealing with millions of visitors.

Option D proposes using CloudFront and an Elastic Load Balancer in front of auto-scaled web servers, and storing the votes in an SQS queue. While this approach can handle high traffic, using an SQS queue to store votes can introduce a delay in updating the vote totals. This option also requires additional application servers to retrieve the items from the queue and update the vote totals into a DynamoDB table.

Option C is the best choice since it uses CloudFront and an Elastic Load Balancer to handle high traffic, and stores votes directly in a DynamoDB table. DynamoDB provides high availability, scalability, and performance, and a DynamoDB table with a large read capacity unit can handle millions of reads per second. Using Amazon's login service to authenticate users before processing their votes also ensures security and reliability.

In summary, Option C provides a scalable, reliable, and secure architecture to handle millions of visitors and maintain good performance for the TV voting system.