hands-on lab

Managing a Redis Instance Using Google Cloud Memorystore

Beginner
55m
389
4.2/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Because new applications require to be reliable and super fast, caching is one of the solutions you should implement in an application to guarantee no time is spent without any reason. Suppose you are serving an application that serves images stored on a database, and suppose you have thousands of images stored on this database. On each request, you should perform a DB query that can take some time to be executed. Instead of always performing queries on the DB, you can set a middle-level caching system, where you store the most recent requested images. So, if a new request for one of these images is made, you first try to perform a query on the caching system, which is faster than the DB. If the image is here (cache hit), you send back to the user; if not (cache miss), you then perform a DB query. This is basically one of the most common scenarios when using a caching system. A caching system is a small and super fast in-memory store that lets you build caching solutions to avoid spending time performing useless queries on a DB.

Because of this importance, Google offers an in-memory caching solution through Google Memorystore. It is a scalable, secure, and highly available in-memory service for both Redis and Memcached. Redis is an in-memory caching system that allows you to store and retrieve structured data.

In this lab, you will use Google Memorystore to create a Redis instance, you will connect to it and perform some operations, and you will learn how to scale it up.

Learning Objectives

Upon completion of this lab you will be able to:

  • Create a Redis instance
  • Connect to a Redis instance and perform caching operations
  • Scale out a Redis instance

Intended Audience

This lab is intended for:

  • Google Professional Data Engineer (PDA) certification candidates
  • Solutions Architects who want to build and manage an in-memory caching solution
  • Developers who need to set a caching middleware between their applications and databases

Prerequisites

Basic Redis prerequisites are preferred but not required.

Updates

January 25th, 2022 - Updated the instructions and screenshots to reflect the latest UI

Environment before
Environment after
About the author
Avatar
Stefano Cascavilla
Junior Data Engineer
Students
39,696
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Signing In to the Google Cloud Console
Creating a Google Memorystore Redis Instance
Connecting and Performing Operations to the Redis Instance
Scaling the Memorystore Redis Instance