Performance Optimization Flashcards

1
Q

As a Solutions Architect, you have set up a database on a single EC2 instance that has an EBS volume of type gp2. You currently have 300GB of space on the gp2 device. The EC2 instance is of type m5.large. The database performance has recently been poor and upon looking at CloudWatch, you realize the IOPS on the EBS volume is maxing out. The disk size of the database must not change because of a licensing issue.

Why not increase IOPS on gp2 volume?
Why convert gp2 to io1?

A

IOPS cannot be directly increased on a gp2 volume without increasing its size, which is not possible due to the question’s constraints.

The only solution is to convert the volume into an io1 volume. This will allow us to keep the same disk size while independently increasing the IOPS for that volume.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A development team is looking for a solution that saves development time and deployment costs for an application that uses a high-throughput request-response message pattern.

Which of the following SQS queue types is the best fit to meet this requirement, temporaray, dead letter, delay, or FIFO?

A

Temporary queues help you save development time and deployment costs when using common message patterns such as request-response. You can use the Temporary Queue Client to create high-throughput, cost-effective, application-managed temporary queues.

NOT: dead-letter queues, which other queues (source queues) can target for messages that can’t be processed (consumed) successfully.

NOT: Delay queues let you postpone the delivery of new messages to a queue for a number of seconds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A company’s real-time streaming application is running on AWS. As the data is ingested, a job runs on the data and takes 30 minutes to complete. The workload frequently experiences high latency due to large amounts of incoming data. A solutions architect needs to design a scalable and serverless solution to enhance performance.

Why Fargate and Kinesis Data Streams?

A

For the given use case, we can use Kinesis Data Streams as the ingestion layer and the containerized ECS application on AWS Fargate as the processing layer. Both these components are serverless and can scale to offer the desired performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A company’s real-time streaming application is running on AWS. As the data is ingested, a job runs on the data and takes 30 minutes to complete. The workload frequently experiences high latency due to large amounts of incoming data. A solutions architect needs to design a scalable and serverless solution to enhance performance.

Why Fargate and Kinesis Data Streams?

Why not Lambda?

A

For the given use case, we can use Kinesis Data Streams as the ingestion layer and the containerized ECS application on AWS Fargate as the processing layer. Both these components are serverless and can scale to offer the desired performance.

The maximum timeout value for any AWS Lambda function is 15 minutes. When the specified timeout is reached, AWS Lambda terminates the execution of your Lambda function. Since the use case talks about a job that runs for 30 minutes, Lambda is not an option here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why won’t multi-AZs work to improve read scaling?

A

Multi-AZ deployments are not a read scaling solution, so you cannot use a standby to serve read traffic. The standby is there just for failover

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An e-commerce company uses RDS MySQL DB to store the data. The analytics department at the company runs its reports on the same DB. The engineering team has noticed sluggish performance on the DB when the analytics reporting process is in progress.

How many read replicas can you create?
True or False, read replicas must have same computer power as primary DB?

A

5

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is Amazon EBS volume mounted to the ECS cluster faster than Amazon EFS with Provisioned Throughput mode?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is Aurora Serverless the best option for this scenario?

The engineering team at an IT company is deploying an Online Transactional Processing (OLTP) application that needs to support relational queries. The application will have unpredictable spikes of usage that the team does not know in advance.

A

It’s a simple, cost-effective option for infrequent, intermittent, or unpredictable workloads.

The database design for an OLTP application fits the relational model

Aurora Serverless is the perfect way to create a database that can scale down to 0 servers, and scale up to many servers, as an OLTP database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You are looking to build an index of your files in S3, using Amazon RDS PostgreSQL. To build this index, it is necessary to read the first 250 bytes of each object in S3, which contains some metadata about the content of the file itself. There are over 100,000 files in your S3 bucket, amounting to 50TB of data.

How can you build this index efficiently?
Byte-range request or S3 Select?

A

A byte-range request is a perfect way to get the beginning of a file and ensuring we remain efficient during our scan of our S3 bucket

Use the Amazon S3 Select ScanRange parameter and Start at (Byte) and End at (Byte). However, to start from the beginning, byte range request is more efficient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do Sticky Sessions work?

A

Sticky sessions are a mechanism to route requests from the same client to the same target.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Your e-commerce application is using an RDS PostgreSQL database and an analytics workload also runs on the same database. When the analytics workload is run, your e-commerce application slows down which further affects your sales.

Why doesn’t a multi-AZ RDS database work in this case?

A

a standby database is only used in recovery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A social media application lets users upload photos and perform image editing operations. The application offers two classes of service: pro and lite. The product team wants the photos submitted by pro users to be processed before those submitted by lite users. Photos are uploaded to S3 and the job information is sent to Amazon SQS.

As a solutions architect, what do you recommend?

A

two separate SWS queues and prioritize polling on the pro queue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly