DEV Community

brlikhon
brlikhon

Posted on

Caching Web and Databases Part-3

DAX
Amazon DynamoDB accelerator or in the short form you can also call it as DAX is a fully managed highly available in-memory cache for Amazon DynamoDB. That delivers up to a 10 times improvement in the performance from milliseconds to microseconds even at millions of requests per second and DAX will do all the heavy lifting that is required to add in-memory acceleration to the DynamoDB tables without requiring the developers to manage any kind of caching validation data population or cluster management. There are a lot of benefits of using that since it is a fully managed component. Which means it will be highly scalable, flexible and secure. It is delivering extreme performance all because these things will be built into the component itself. Since it is fully managed and it's really easy to use because it is integrated with DynamoDB. DAX is designed to run within an Amazon VPC environment and you can just launch a DAX cluster in your virtual network and control the access to the cluster by using the security groups of the VPC.
Image description
So, once it is all set up and configured the data will start getting written to the DynamoDB and the cache will also be into action and the reads will be
happening from the cache so as to get the faster response times.
Amazon ElastiCache
So, ElastiCache is a in memory data store that is available in AWS it allows you to seamlessly set up run and scale popular open source compatible in memory data stores in the cloud and since it is a web service it is easy to deploy, operate and scale and also it allows you to choose between two in-memory database engines that is Memcached which is a widely adopted memory object caching system and the Redis which is a popular open source in-memory key value store. That supports data structure such as sorted sets and the list. It is used for retrieving the data from high throughput and low latency in memory data stores and it significantly improved the latency and throughput for many read heavy applications. Workloads for example social media, gaming or media sharing improving the application performance by storing critical pieces of data in memory for low latency access also Amazon ElastiCache is a popular choice for real-time use cases like caching session stores gaming, geospatial services, real-time analytics and queuing. It offers fully managed renders which is watered the most loved database by developers in the stack overflow 2020 developer survey and the Memcached for your most demanding applications. That require sub millisecond response times. Also you can choose between Radius and Memcached based on your needs there are certain special features with both like ElastiCache for Radius is highly available and ElastiCache for Memcached is multi-threaded. So both have certain similarities both have certain differences. It totally depends on your use case that what engine you have to use with your ElastiCache. You can go for ElastiCache for radius or you can go for ElastiCache with Memcached.
Image description
Let's understand the high level working of the ElastiCache for all the internet scale applications like real-time applications in the gaming, media streaming, dating, social media that needs fast access and also for the use cases like all the real-time transactions, chat applications BI and analytics session, store gaming leaderboards and caching ElastiCache works wonders it sits between your web servers and the database to serve the request faster by serving them from the cache itself. It can also be used as a message broker and it stores ephemeral or the temporary data in memory for the quick responses now let's have a look at a few of the use cases of ElastiCache. First of all we can use ElastiCache with our existing database to cache the frequently accessed records it will easily load of your relational or the NoSQL database either Redis or Memcached engine because of its low latency and the high throughput. It can also be used with Amazon S3 and additionally ElastiCache for Redis can deliver query results caching persistent session caching and full page caching. Apart from this it can be used to manage a session information for both Redis and Memcached. The session management is commonly required for the online applications including games, e-commerce website and the social media platforms. Apart from this in terms of machine learning we can use ElastiCache for reduce in the use cases such as fraud detection in gaming and financial services real time bidding in AdTech and match making in dating and ride sharing to process live data and make the decisions within tens of milliseconds apart from this in streaming solutions we can use ElastiCache for reduce with the streaming solutions such as Apache Kafka and Amazon Kinesis as a store to ingest process and analyze real-time data and ElastiCache can be used for real-time analytic use cases such as social media Ad targeting personalization IOT and the time series data analytics.

Discussion (0)