Caching Flashcards
External caching
cache data that’s going to be returned to users (images, videos, static content)
Internal caching
- used to speed up databases
- The less we talk to the database, the better
What do caches help with?
Speed. Put them everywhere, and favor answers that use a cache.
CloudFront for caching
- External cache
- CDN
- improves delivery times by delivering data, apps, APIs to edge locations globally to reduce latency
What kind of cache is ElastiCache?
- Internal cache
Global Accelerator as a Cache
speeds up external connections
How can you put a secure connection on S3 static websites?
CloudFront
- attach a custom SSL certificate
- or create signed URLs or signed cookies
Is CloudFront global distribution used for blocking or picking countries?
No, you can only pick continents (use WAF instead)
How do you block individual countries?
- Use WAF
- CloudFront is only good at continents
CloudFront TTL
Time to live expiry for content expiration
For the exam, how can you solve every sort of external customer performance issue?
Put CloudFront in front of the application
What is the main purpose of CloudFront edge locations?
Speed
Can you do CloudFront on-prem?
Yes. On-Prem and AWS.
Can you pick a specific edge location?
No
What is ElastiCache?
a managed version of two open source technologies:
- memcached
- redis
it sits in front of a relational database
Memcached
- simple database caching solution
- not a database by itself
- no failover
- single AZ
- no backups
Redis
- supported as a caching solution
- standalone NoSQL db
- failover support
- can be multi-AZ
- supports backups*
Dynamo DB Accelerator (DAX)
Can reduce Dynamo DB response times from milliseconds to microseconds.
- highly available
- lives inside a VPC you specify
- you determine node size & count, TTL for data, and maintenance windows
Which caching solution can be a standalone DB with multi-AZ and backups?
Redis
How do you fix IP caching?
Global Accelerator - it allows users to use the same 2 static IP addresses for the Elastic Load Balancer (even if they change behind the scenes)
Weighted Pools
Global Accelerator feature - you can create weighted groups behind IPs to test out new features or handle failure in your environment
Caching Exam tips - Questions to ask?
1) Can it be cached?
2) Will it benefit this architecture?
3) How does content in the cache get updated (TTLs)
4) Does the caching help with anything other than speed?
Cases where caching helps with more than just speed
- CloudFront + WAF -> Security
- Global Accelerator -> IP Caching fix
What is the only option for adding HTTPS to a static website being hosted by S3?
CloudFront
When you see “in memory DB” what do you think of?
a NoSQL option like Redis or DynamoDB
If asked to pick between Redis or DynamoDB
Pick DynamoDB