ElastiCache and AWS CLI Flashcards

1
Q

When should you not cache data

A

When you deal with anti-patterns, where data is changing rapidy

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

What is the lazy loading caching pattern

A

If application cache miss in elasticache, it reads from D.B and writes back to cache

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

What are the pros and cons of the lazy loading caching pattern

A

Pros: Only requested data is cached (the cache isn’t filled up with unsued data). Node failures are not fatal.
Cons: Cache miss penalty that results in 3 round trips, noticeable delay for that request.
Stale data: Data can be updated in database but not in cache

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

What is the WriteThrough caching pattern

A

If application cache miss, it writes to the D.B, then writes to teh cache

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

What are the pros and cons of the WriteThrough caching pattern

A

Pros: Data in cache is never stale, reeads are quick. Write penaly vs. Read penalty(each write requires 2 calls.
Cons:
Missing data until it is added/updated in the D.B.
A lot of data will never be read.

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

What are the three ways of cache evictions?

A

You delete the item explictily in the cache
Item is evicted becasue the memory is full and it’s not recently used (LRU)
You set an item TTL

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

When should you not set a TTL

A

When you’re using WriteThrough

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

Do read replicas require us to change our SQL connection string?

A

Yes, they add new endpoints for databases to read from

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

How does your organization enforce SSL connections on your MySQL database?

A

Apply a ‘Require SSL’ statement to all your users in your SQL database

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

If you get an AWS command not found:

A

The aws executable is not in the PATH environmental variable

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

EC2 instance metadata and url:

A
  • Allows Ec2 instances to “learn about themselves” without using an IAM role for that purpose.
  • IP: 169.254.169.254/latest/meadata
  • Can retrieve IAM role name but not policy.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

If you want to perform actions on AWS directly from your application code?

A

Use an AWS Sdk

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

API Rate limits

A

Describe Instances API for Ec2 has a limit of 100 calls per second.
GetObject on S3 has a limit of 5,500 GET per second per prefix

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

For Interment Errors:

A

Implement exponential back off

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

For consistent errors

A

Request an API throttling limit increase

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

How can you request a service limit increase for running on demand standard instances?

A

By opening a ticket

17
Q

How can you request a service quota increase?

A

By using the Service Quota API

18
Q

If you get a ThrollingException intermittently use

A

Exponential backoff

19
Q

“An application deployed on an Ec2 instance is using environmental variables w//credentials from an IAM user to call the Amazon S3 API, the IAM instance profile was assigned to the Ec2 instance, but it still had access to all S3 buckets. Why?

A

Credential chain is still giving priorities to the environment variables

20
Q

When you call the use SDK or CLI, HTTP requests

A

Are signed for, if not using it, need to sue Sigv4