← AWS Solutions Architect Professional: complex decisions
04 / 8 · 35 MIN

Security, performance, and cost in design

Choose mechanisms according to data, load, and service constraints.

Concept and mechanism

A cache improves performance only when it reuses the right response for the right request. If output varies by tenant and the cache key omits that dimension, different requests may receive the same response. The first decision is to prevent incorrect sharing. Then define which responses may be stored, which variants need separation, and how authorization is validated. A client-supplied tenant identifier does not replace access control. Private data may require disabling caching for the relevant behavior. Hit-ratio improvement should be assessed within these conditions, not as an isolated objective.

Guided application

A queue also changes the problem rather than removing it. SQS standard may redeliver a message, so a business movement needs durable idempotency when repetition is unacceptable. Keeping IDs only in memory does not survive worker failure. Size consumers and dependencies for the maximum age of pending work. If an API has low CPU but waits for database connections, investigate pools and queries before doubling frontends. Compare architectures through total cost under the same requirements: cheaper compute may add traffic, night support, and recovery work. Use observed values or declared estimates without turning isolated prices into savings promises.

IN PRACTICE

The worker committed the movement and crashed before deleting the message. The business identifier allows recognizing repetition without applying another movement.

Common pitfalls

Cache key as authorization; delivery as unique effect; queue as deadline guarantee; average CPU as complete diagnosis.

Related topics: Operations, evidence, and remediation · Improvement, costs, and lifecycle

Take this idea with you

Connect each optimization to data correctness, failure behavior, and total cost.

Create account

Reference: SAP-C02 content domain 2 · SAP-C02