Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
AWS Certified Developer - Associate Guide - Second Edition

You're reading from  AWS Certified Developer - Associate Guide - Second Edition

Product type Book
Published in Jun 2019
Publisher Packt
ISBN-13 9781789617313
Pages 812 pages
Edition 2nd Edition
Languages
Authors (2):
Vipul Tankariya Vipul Tankariya
Profile icon Vipul Tankariya
Bhavin Parmar Bhavin Parmar
Profile icon Bhavin Parmar
View More author details

Table of Contents (30) Chapters

Preface 1. Overview of AWS Certified Developer - Associate Certification 2. Understanding the Fundamentals of Amazon Web Services 3. Identity and Access Management (IAM) 4. Virtual Private Clouds 5. Getting Started with Elastic Compute Cloud (EC2) 6. Handling Application Traffic with ELB 7. Monitoring with CloudWatch 8. Simple Storage Service, Glacier, and CloudFront 9. Other AWS Storage Options 10. AWS Relational Database Service 11. AWS DynamoDB - A NoSQL Database Service 12. Amazon Simple Queue Service (SQS) 13. Simple Notification Service (SNS) 14. AWS Simple Workflow Service (SWF) 15. CloudFormation Overview 16. Understanding Elastic Beanstalk 17. Overview of AWS Lambda 18. Key Management Services 19. Working with AWS Kinesis 20. Working with AWS CodeBuild 21. Getting Started with AWS CodeDeploy 22. Working with AWS CodePipeline 23. CI/CD on AWS 24. Serverless Computing 25. Amazon Route 53 26. ElastiCache Overview 27. Mock Tests 28. Assessments 29. Another Book You May Enjoy

ElastiCache Overview

In today's world, real-time web and mobile apps, such as gaming, media, social, and many other internet-scale applications, need high-throughput and low-latency performance, along with high concurrency. In order to achieve this for read-heavy applications, it is essential to store frequently used data on the memory rather than on a disk. Many a time when an application is hosted on EC2 or on-premises servers, we encounter memory (RAM) scarcity.

When you encounter memory issues, you can neither keep on adding more memory, nor can you keep scaling these servers vertically, as it would be expensive. Similarly, when we scale the environment horizontally, it adds operational overheads and may not necessarily resolve memory issues at the instance level.

This chapter elaborates on how ElastiCache can be helpful in handling more memory needs. The following topics...

Introduction to ElastiCache

Before we discuss Amazon ElastiCache, let's understand what an in-memory cache is, and where it can be used.

It is advantageous to have a cost-effective, separate, and dedicated mechanism, just to store and access frequently used data that supports redundancy and scalability without any downtime. It not only helps to achieve minimal latency for the end user, but also reduces the load on data storage.

The implementation of in-memory caching in the solution architecture is shown in Figure 27.1. In the diagram, in-memory caching sits in between the actual data store, such as the database or static content (S3). The end user initiates a web client/application request to the server through the load balancer. The web/app server routes the data read request to the cache cluster. If the data is already cached, the request response is sent back. If the...

ElastiCache engine types

Amazon ElastiCache offers two open source caching mechanisms, Redis and Memcached. Existing applications working with open source versions of Redis and Memcached can run with Amazon ElastiCache with almost no modification. These both offer a level of high performance, but it is essential to understand the differences between them in order to choose the correct engine to meet our needs.

Amazon ElastiCache for Memcached

Compared to open source Memcached, Amazon ElastiCache for Memcached has several cutting-edge and enhanced reliability features, which make it more favorable to use in the cloud for a production load:

  • It can automatically detect node failure and recover accordingly.
  • It supports automatic...

Designing the right cache for your workload

In order to design a perfect cache, it is best practice to consider read/write speed, scaling, memory usage, and disk I/O. For a detailed comparison of these factors, please refer to the table at https://aws.amazon.com/elasticache/redis-vs-memcached/.

At the highest level, we can say that Memcached is generally used to store small and static data, such as HTML code pieces. As the Memcached core memory management is efficient and simple, it has a very small footprint of metadata; as a result, it consumes less memory for overheads. The disadvantage of Memcached is that it doesn't provide persistent storage options. If any node/cluster fails for any reason, all the data is lost. So, it is highly recommended to use Memcached with easily recoverable data.

Redis has five primary data structures, along with finely-grained control over...

Summary

  • Amazon ElastiCache is a scalable, reliable, and fully managed in-memory data store and caching service that improves the performance of your application, by serving the data from the in-memory cache instead of retrieving it from the source data store.
  • Amazon ElastiCache offers two open source caching mechanisms, Redis and Memcached.
  • As compared to open source Memcached, Amazon ElastiCache for Memcached has several cutting-edge and enhanced reliability features, which make it more favorable to use in the cloud for a production load.
  • Amazon ElastiCache for Memcached can automatically detect node failure and recover accordingly.
  • Amazon ElastiCache for Memcached supports automatic node discovery, as it saves developers from making any changes to the application when a node has been added or removed in the cluster.
  • Amazon ElastiCache can provide high availability and avoid...
lock icon The rest of the chapter is locked
You have been reading a chapter from
AWS Certified Developer - Associate Guide - Second Edition
Published in: Jun 2019 Publisher: Packt ISBN-13: 9781789617313
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}