hands-on lab

Managing a Memcached Cluster Using Google Cloud Memorystore

Difficulty: Beginner
Duration: Up to 45 minutes
Students: 59
Rating: 5/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.

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 have developed an application that is distributed on a few different servers. Your application implements sessions for each user, so you need to store and handle this session somewhere. Because your application is distributed, you can't store the sessions on the local machines, but you need to find another solution. Well, a caching solution is what you are looking for. In particular, Memcached is an object caching system. It allows you to store key-value fields where the key needs to be unique, and it's used to set and then retrieve data; the value is the object you want to store (such as the session object in the previous example).

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.

In this lab, you will create a Memcached cluster, you will connect to it and perform some operations, and you will finally scale it out.

Learning Objectives

Upon completion of this lab you will be able to:

  • Create a Memcached cluster
  • Connect to a Memcached cluster and perform caching operations
  • Scale out a Memcached cluster

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 Memcached prerequisites are preferred but not required.

Updates

May 29th, 2024 - Updated lab to use Debian 12

Environment before

Environment after

Covered topics

Lab steps

Signing In to the Google Cloud Console
Creating a Google Memorystore Memcached Cluster
Connecting and Performing Operations to the Memcached Cluster
Scaling the Memorystore Memcached Cluster