Task Statement 2.1: Design scalable and loosely coupled architectures.
📘AWS Certified Solutions Architect – (SAA-C03)
1. Introduction
When designing scalable and loosely coupled architectures, applications must be able to serve users from different locations quickly and reliably. If all users access resources from a single origin server or region, latency increases and the system can become overloaded.
To solve this problem, AWS provides edge accelerators, mainly through Content Delivery Networks (CDNs).
The most important AWS CDN service is Amazon CloudFront.
A CDN distributes content to edge locations around the world so users receive data from a server closer to them instead of the origin server.
This improves:
- Performance
- Scalability
- Availability
- Security
- Cost efficiency
For the AWS Certified Solutions Architect – Associate (SAA-C03) exam, understanding how CDNs work and when to use them is very important.
2. What is an Edge Accelerator?
An edge accelerator is a service that moves application content closer to users by storing copies of data in many locations around the world.
These locations are called edge locations.
When a user requests content:
- The request goes to the nearest edge location.
- If the content exists in the cache, it is returned immediately.
- If not, the edge location retrieves it from the origin server.
- The content is then cached for future requests.
This process reduces the need for the origin server to handle every request.
3. AWS CDN Service
The main AWS CDN service is:
- Amazon CloudFront
CloudFront distributes content through a global network of edge locations.
It integrates with many AWS services including:
- Amazon S3
- Amazon EC2
- Elastic Load Balancing
- AWS Lambda
- AWS WAF
CloudFront is commonly used to deliver:
- Static content
- Dynamic content
- APIs
- Streaming media
- Software downloads
4. Key Components of a CDN Architecture
4.1 Edge Locations
Edge locations are data centers located around the world where CDN servers cache content.
Functions:
- Cache content close to users
- Reduce latency
- Reduce origin load
Users always connect to the nearest edge location.
4.2 Origin Server
The origin is the main server that stores the original content.
Common AWS origins include:
- Amazon S3 (for static files)
- Amazon EC2 (for applications)
- Elastic Load Balancing
- On-premises servers
When content is not cached at the edge, CloudFront retrieves it from the origin.
4.3 Cache
The cache is the temporary storage of content in edge locations.
Cached objects may include:
- Images
- Videos
- JavaScript files
- CSS files
- API responses
- Software packages
Caching reduces repeated requests to the origin.
4.4 Time To Live (TTL)
TTL defines how long content stays in the cache before CloudFront checks for a new version.
Types:
- Minimum TTL
- Default TTL
- Maximum TTL
Longer TTL = fewer origin requests
Shorter TTL = more updated content
5. How CDN Improves Scalability
CDNs help applications scale in several ways.
5.1 Reducing Origin Load
Without CDN:
Users → Application server
With CDN:
Users → Edge locations → Origin (only when needed)
This reduces the number of requests reaching the origin server.
5.2 Handling Traffic Spikes
During high traffic periods:
- Edge locations serve cached content
- Origin infrastructure receives fewer requests
This prevents server overload.
5.3 Global Performance
Applications deployed in one AWS region can still serve users worldwide efficiently.
Edge locations reduce latency by serving nearby users.
6. CDN and Loosely Coupled Architecture
A loosely coupled architecture means components operate independently.
Using a CDN supports this principle because:
- The frontend delivery layer is separated from the backend systems
- Application servers do not directly serve static files
- Backend services can scale independently
Example architecture:
User
↓
CloudFront CDN
↓
Application Layer (Load Balancer / EC2)
↓
Backend Services
Each layer works independently.
7. Types of Content Delivered by CDN
7.1 Static Content
Static content does not change frequently.
Examples in IT systems:
- Images
- JavaScript files
- CSS files
- Software installers
- Documentation files
Static files are ideal for CDN caching.
Typical architecture:
CloudFront → Amazon S3
7.2 Dynamic Content
Dynamic content changes frequently.
Examples:
- API responses
- Web applications
- Database queries
CloudFront still improves performance by:
- Optimizing network routing
- Using persistent connections
- Using TCP optimizations
7.3 Streaming Content
CloudFront supports media streaming for:
- Video platforms
- Live streaming services
- Training platforms
It improves buffering performance and reduces delays.
8. Security Benefits of Using CDN
CDNs provide several built-in security features.
8.1 DDoS Protection
CloudFront integrates with:
- AWS Shield
It helps absorb large traffic attacks before they reach the origin servers.
8.2 Web Application Firewall
CloudFront integrates with:
- AWS WAF
This allows filtering of:
- Malicious requests
- SQL injection attempts
- Cross-site scripting attacks
8.3 Origin Protection
You can configure CloudFront to allow only CloudFront to access the origin.
Example:
CloudFront → Amazon S3
Using Origin Access Control (OAC) or Origin Access Identity (OAI) prevents direct S3 access.
9. Additional Edge Computing Features
CloudFront supports edge computing capabilities.
9.1 Edge Functions
These allow code to run at edge locations.
Services include:
- Lambda@Edge
- CloudFront Functions
They can:
- Modify requests
- Add security headers
- Redirect users
- Perform authentication
This reduces latency because processing happens near the user.
10. Cache Invalidation
Sometimes cached content must be updated immediately.
CloudFront allows cache invalidation, which removes old content from edge caches.
Typical cases:
- New application deployment
- Updated software packages
- Updated configuration files
After invalidation, CloudFront retrieves the new version from the origin.
11. Multi-Origin CDN Architecture
CloudFront can work with multiple origins.
Example architecture:
CloudFront
→ Static content origin: Amazon S3
→ Dynamic content origin: Elastic Load Balancing
CloudFront routes requests based on path patterns.
Example:
/images → S3
/api → Application servers
This improves scalability and separation of components.
12. When to Use a CDN (Important for the Exam)
Use a CDN when:
- Users are globally distributed
- Applications deliver static files
- Applications experience traffic spikes
- Content must load quickly worldwide
- You want to reduce backend load
- You need DDoS protection at the edge
13. Exam-Focused Architecture Pattern
A common AWS architecture tested in the exam:
Users
↓
Amazon CloudFront
↓
Elastic Load Balancing
↓
Amazon EC2 (Auto Scaling)
↓
Database
Static content architecture:
Users
↓
Amazon CloudFront
↓
Amazon S3
14. Advantages of Using Edge Accelerators
| Benefit | Explanation |
|---|---|
| Low latency | Content served from nearby edge locations |
| High scalability | CDN handles millions of requests |
| Reduced origin load | Cached responses reduce backend traffic |
| Global delivery | Faster service for worldwide users |
| Security | Integrated DDoS protection and WAF |
| Cost optimization | Fewer requests to origin servers |
15. Key Points to Remember for the SAA-C03 Exam
- Amazon CloudFront is AWS’s primary CDN.
- CDN stores content in edge locations worldwide.
- CDNs cache content to reduce origin server load.
- Works with Amazon S3, Amazon EC2, and Elastic Load Balancing.
- Improves performance, scalability, and availability.
- Provides DDoS protection through AWS Shield.
- Provides application filtering through AWS WAF.
- Supports edge computing via Lambda@Edge.
