<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Himanshu Singh on Medium]]></title>
        <description><![CDATA[Stories by Himanshu Singh on Medium]]></description>
        <link>https://medium.com/@himanshu.singh_98654?source=rss-95bfe9687696------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7CNE1pSkt9Kcg3OMV9clHw.jpeg</url>
            <title>Stories by Himanshu Singh on Medium</title>
            <link>https://medium.com/@himanshu.singh_98654?source=rss-95bfe9687696------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:25:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@himanshu.singh_98654/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrate Redis from AWS ElastiCache to GCP Memorystore]]></title>
            <link>https://blog.searce.com/migrate-redis-from-aws-elasticache-to-gcp-memorystore-d3daf3c003c2?source=rss-95bfe9687696------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3daf3c003c2</guid>
            <dc:creator><![CDATA[Himanshu Singh]]></dc:creator>
            <pubDate>Tue, 20 Dec 2022 08:13:29 GMT</pubDate>
            <atom:updated>2022-12-26T07:19:00.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4zn9tVOv4RbMdDTd.png" /></figure><blockquote><strong>Introduction to Redis:<br></strong>Redis which is also named as Remote Dictionary Server, is a fast, open source, in-memory, key-value data store that supports high throughput and low latency reads and writes. It is used by millions of developers as a database, cache, streaming engine, and message broker.</blockquote><blockquote><strong>ElastiCache:<br></strong>It is a completely managed service offered by AWS.It is compatible with Redis and Memcached. It supports in-memory caching, flexible and real-time use cases, which might be used for caching and which accelerates the performance of applications and databases. ElastiCache for Redis may be a blazing fast in-memory data store that has sub-millisecond latency to power internet-scale real-time applications. ElastiCache for Redis works together with your Redis clients and uses the open Redis format to store your data.</blockquote><blockquote><strong>MemoryStore:<br></strong>It is a fully managed in-memory data store service for Redis and Memcached at Google Cloud. Memorystore automates complex tasks for open source Redis and Memcached like enabling high availability, failover, patching, and monitoring so you can spend more time on other useful stuffs. Memorystore is used for different types of in-memory caches, transient stores and it is also used as a highly available key-value store.This serves multiple use cases including web content caches, session stores, distributed locks, stream processing, recommendations, capacity caches, gaming leaderboards, fraud and threat detection.</blockquote><h3><strong>Migration Overview:</strong></h3><p>Lift and shift approach can be used for migration of Redis from ElastiCache to Memorystore. Below are the steps which can be followed for same.<br>• Creating a Memorystore instance<br>• Take backup of Redis ElastiCache<br>• Store it in AWS S3 bucket<br>• Transfer backup to GCP Cloud Storage<br>• Import data to Memorystore</p><p>As Memorystore doesn’t support sharding, in order to migrate data from a sharded environment it is recommended to create a new clone instance from existing cluster with single shard and then follow the below steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rWFfrDK10W3gBPZ4blszCQ.png" /></figure><h3>Instance Creation</h3><ol><li>To create a Memorystore Redis instance, go to Memorystore service on GCP console and click on create instance. Mention an instance id and display name.</li><li>There will be 2 options for selecting the Tier.<br><strong>Basic Tier:</strong> Selecting this Tier will create a basic instance with no high availability and no read replica’s but will create with a lower cost.<br><strong>Standard Tier:</strong> Selecting this Tier will create an instance with high availability feature, provision of creating read replicas upto 5 read replicas with one writer end point and one reader endpoint. Single reader endpoint for the replicas will balance the load automatically among the replicas. Also during a failover when the writer/reader instance is not available there would be highly available instances at backend which will take care of the read and write request without changing the writer and reader endpoints.<br>Also remember that we cannot move from Basic Tier to Standard Tier for a particular instance and vice versa.</li><li>In Memorystore there is no choice of selecting the instance type, rather than that we can select the memory of instance from 1GB to 300GB.<br>However in case of having read replicas the minimum instance memory required is 5GB. There is no concept of assigning CPU here, in fact the throughput of the instance depends on the memory assigned to the instance.</li><li>Next would be to select the VPC network and allocate the IP ranges and some more configurations like the authentication, maintenance window, backup duration, selecting Redis version. Now just create the instance.</li></ol><h3><strong><em>Backup Creation</em></strong></h3><p>1. Amazon ElastiCache running Redis can back up their own data. We can use the backup to restore a cluster or seed a new cluster. The backup consists of the cluster’s metadata, along with the data present in the cluster. All backups are written to Amazon S3, which provides durable storage. At any point of time, we can restore the data by creating a new Redis cluster and importing it with data from the backup.</p><p>To start with migration we should have a manual or automated backup of Redis instance. To take a manual backup select the Redis instance and from the drop down menu of Actions section select Backup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnGhnzHKxz14A_z_untXDw.png" /></figure><p>2. If Redis is running in a node group with more than one node. It is preferred to take backup from any of the read replicas, so that the primary node remains unaffected and can continue serving requests without slowing down.</p><p>3. Manual as well as automated backups are visible in Amazon ElastiCache’s backup section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wpzePhtyINoq0TN0s5mEvA.png" /></figure><h3><strong><em>Copying backup to S3 bucket</em></strong></h3><p>1. Next step would be to export the backup to one of the S3 bucket. For this create a new S3 bucket with Access control list(ACL) enabled, so that it can be modified in next steps if required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxzUa2NG56k_DEQqGJoP7Q.png" /></figure><p>2. To export the backup to S3 bucket, select the backup and click on copy.<br>On this page a new backup name and target S3 bucket name is to be provided.<br>There could be some permission issue while copying the backup to S3 bucket. <br><em>Elasticache was unable to validate the authenticated user has access on the S3 bucket.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqJiIFTbc8kFopMTbLPJvA.png" /></figure><p>3. To fix above issue, there is a requirement to add canonical id to ACL of the bucket. For this open the bucket, go to the permission tab, in the Access control list (ACL) setting.<br> <br>Add grantee <strong><em>Canonical Id</em></strong> 540804c33a284a299d2547575ce1010f2312ef3da9b3a053c8bc45bf233e4353 with the following options:<br>• <strong><em>Objects: List, Write<br></em></strong>•<strong><em> Bucket ACL: Read, Write</em></strong></p><p>This is required so that ElastiCache has access to bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDGsc8QTGkHwZ3OQ3ee9Mw.png" /></figure><p>4. After making above changes, retry copying and the copying operation should be initiated successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*925tnBeKHq1ew-99sCRd3A.png" /></figure><p>5. Post completion of copying process the <strong><em>rdb</em></strong> file should be visible in S3 bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haH0xzqxjNoDxZ48kWR5BA.png" /></figure><h3>Transferring Backup from S3 to Cloud Storage</h3><p>1. For transferring the backup from AWS S3 to GCP Cloud storage we will using <em>Data Transfer</em> service at GCP end. In the GCP console open Data Transfer service and click on create transfer job. Select source type as Amazon S3 and destination Type as Google Cloud Storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HIRokKX7W2aKhZjSfs4LSQ.png" /></figure><p>2. For transferring backup from S3 to GCP , IAM user would be required with full S3 access, take a copy of its Access Key ID and Secret Access Key.<br>Both of these would be required in next step where we need to choose a source. <br>• Mention the AWS S3 bucket name.<br>• Select authentication method as Access Key.<br>• Provide the Access Key ID and Secret Access Key.<br>• Click Next Step</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pj1QXLQNg9EqzYmnX_Gwcg.png" /></figure><p>3. Now select the Cloud Storage bucket of current account where data needs to be copied and click Next Step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uSVpj5Wox2FOzIG8X5kv1w.png" /></figure><p>4. Configure some more bucket settings as per the requirement and click Next Step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KGbRJegBj2bitn6TKaN3g.png" /></figure><p>5. For Scheduling Options select run once and create the job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9pyD8Aw7pBJBtwQwuQiUTQ.png" /></figure><p>6. Post completion of the job the <em>rdb</em> file will be visible in the cloud storage bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kRHrtZQuVjvv2NG4QnIMA.png" /><figcaption>Job Completion Status</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MsCl8bfhN8RuAjjCd0E6rQ.png" /></figure><blockquote>Note: In order to simplify the above step, we can also download the rdb file from AWS S3 bucket to their local machine and later can upload on GCP cloud storage.</blockquote><h3>Importing data to Memorystore</h3><p>1. Final step would be to import the data in the existing Memorystore Redis instance. Importing data will overwrite the existing data.<br>For importing data open the redis instance in the GCP console and select import option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lxEukt7QrLe0vWrbUAjTVw.png" /></figure><p>2. Select the cloud storage bucket and rdb file and then click on import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pGFW2hOZ5CuqJ7cwvzjLJQ.png" /></figure><blockquote>NOTE: Import process may take few minutes and the instance would not be available during that duration and then the data will be available on Memorystore.</blockquote><p>Reference :</p><ol><li><a href="https://cloud.google.com/memorystore/docs/redis/pricing">https://cloud.google.com/memorystore/docs/redis/pricing</a></li><li><a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html">https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3daf3c003c2" width="1" height="1" alt=""><hr><p><a href="https://blog.searce.com/migrate-redis-from-aws-elasticache-to-gcp-memorystore-d3daf3c003c2">Migrate Redis from AWS ElastiCache to GCP Memorystore</a> was originally published in <a href="https://blog.searce.com/">Searce</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>