Decoupling Applications - SQS Flashcards

1
Q

What is the purpose of AWS integration and messaging services?

A

To orchestrate and enable communication between different services or applications, allowing them to share data and information.

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

What are the two patterns of application communication?

A

Synchronous Communication
Asynchronous (Event-Based) Communication

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

What is synchronous communication in applications?

A

One application directly connects to another, such as a buying service directly calling a shipping service to perform an action.

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

What is asynchronous communication in applications?

A

Applications communicate via middleware (e.g., a queue), where one service sends messages to the queue and another service retrieves them without direct interaction.

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

What is a common problem with synchronous communication?

A

It can lead to system failures if one service overwhelms another due to sudden spikes in traffic or processing needs.

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

Why is decoupling applications beneficial?ues?

A

It allows independent scaling of services, prevents system overloads, and improves reliability during traffic spikes.

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

What AWS services are used for asynchronous communication?

A

SQS (Simple Queue Service): For queue-based decoupling.
SNS (Simple Notification Service): For pub/sub messaging.
Kinesis: For real-time data streaming and big data processing.

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

What is Amazon SQS?

A

Amazon SQS (Simple Queue Service) is a fully managed queuing service used to decouple application components, enabling scalable and reliable message-based communication.

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

What are the key components of an SQS queue?

A

Producers: Send messages to the queue.
Consumers: Poll and process messages from the queue.

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

What is the default and maximum retention period for SQS messages?

A

Default: 4 days.
Maximum: 14 days.

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

What are the size limits for messages in SQS?

A

Messages can be up to 256 KB.

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

What type of delivery does SQS provide?

A

At-least-once delivery: Messages may be delivered more than once.
Best-effort ordering: Messages may not always arrive in order.

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

How do consumers process messages from SQS?

A

Poll messages using the ReceiveMessage API.
Process messages.
Delete messages using the DeleteMessage API to prevent reprocessing.

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

How can Auto Scaling be integrated with SQS?

A

Use ApproximateNumberOfMessages as a trigger.
Set a CloudWatch alarm to scale EC2 instances in the Auto Scaling group based on queue length.

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

How does SQS ensure security?

A

Encryption in-flight: Messages sent over HTTPS.
At-rest encryption: Using KMS keys.
IAM Policies: Regulate API access.
Access Policies: Allow cross-account or service-specific access.

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