Amazon CloudFront
A webservice that delivers content
Low latency through caching and delivery of content from edge locations closest to the user
Supports both HTTP to allow static and dynamic content, as well as Real Time Messaging Protocol (RTMP), for streaming videos
Optimized to work with Amazon services such as S3, ELB, etc. as well as seamlessly works with any non-AWS origin serverIdeal Use Patterns
It is ideal for the distribution of frequently accessed static or dynamic content, or streaming audio or video that has edge delivery.
Infrequently accessed data
Programmatic cache invalidationCloudFront supports cache invalidation, however AWS recommends using object versioning rather than programmatic cache invalidation.Performance
It is designed to deliver content at a low latency and high bandwidth rate. This redirects the user to the nearest edge location in terms latency and caches the content to prevent the round trip back to the origin server. Durability & Availability
High availability through content delivery from distributed global networks of edge locations. Amazon monitors the network paths that connect Origin servers to CloudFront.
It does not offer durable storage. This is more the responsibility of the Origin server that provides the content, e.g. S3Cost Model
There are two pricing options:regional data transfer out (per gigabyte) and
Requests (per 10,000)Scalability and Elasticity
It automatically responds to changes in demandElastiCache, ensuring seamless scalability and elasticity.
This webservice makes it easy to deploy, manage, and scale a distributed cache in the cloud.
This allows for faster retrieval of data using a managed, in-memory cache system. It improves the performance of applications
Supports Memcached (object caching), Redis (key structure support key value store) open-source caching enginesIdeal usage patterns
Improve application performance by storing critical information in-memory to provide low latency access.
Anti-Patterns
Amazon DynamoDB is a better option for applications that require fast access to data and strong data durability.
ElastiCache offers low latency access, but the performance of ElastiCache is dependent on the caching strategy and hit ratio at the application level. Durability & Availability
Stores transient data or copies of durable data in transient storage. The source manages data durability.
The Memcached engineall ElastiCache provides a single provisioning zone for ElastiCache nodes within a single cache cluster.
ElastiCache monitors the health and replaces any damaged cache nodes in the event of network partitioning or host hardware failure.
The cluster will still be available in the event of a cache node failure. However, performance may be affected by the time required to repopulate the cache using the new “cold”, cache nodes.
You can create redundant cache clusters in different availability zones to provide greater fault tolerance for failures of Availability Zones or cold-cache effects.
ElastiCache supports replication up to five read replicas to scale with the Redis engine. You can also place read replicas in other availability zones to increase availability.
ElastiCache monitors the primary network node and will replace or repair it if necessary using the same DNS name.
If the primary cache recovery fails or its availability zone is unavailable, the primary node can be failed to one.