Challenge 1: Your first day as SRE
Prerequisites
Before we start our first day as SREs, we are going to start up metrics collection so that we have a nice load of metrics to work with in later challenges. The load generator is preprovisioned and the address is provided to you by the coach.
Step 1: Make note of the necessary environment variables
- The values will be provided to you by the coach. Each team has its own set of values.
- Copy the values (after replacing the placeholders) into a notepad to be able to re-run when needed.
- You might need to re-apply them before running command-line commands for all challenges.
-
The cloud console terminal times-out after around 30 minutes of inactivity.
FRONTEND_ADDRESS=<your frontend address> BACKEND_ADDRESS=<your backend address> LOCUST_ADDRESS=<your locust address> PROJECT_ID=<your project id> GKE_CONNECTION_STRING=<the GKE connection string> # Don't worry you don't need to have any GKE knowledge.
Step 2: Generate Load on the Application
-
Open your browser and navigate to the Locust load generator address ($LOCUST_ADDRESS). You should see a screen similar to the one below:
-
Fill out the Start new load test form with the following values:
- Number of users at peak: 5
- Spawn rate: 0.05
- Host: http://mockserver-service.movie-guru.svc.cluster.local
- Runtime: 7h (under Advanced options)
This configuration will gradually increase the load on the backend, spawning around 3 simulated users over the course of 7 hours.
-
Once the load test begins, Locust will swarm various backend endpoints, simulating traffic as users interact with the application. You should see something similar to this:
Introduction
Ok. You have started on Day 1 as the newly formed SRE team for The Movie Advisory Company, a start-up whose first product is the Movie Guru app.
Description
This challenge involves exploring the Movie Guru app and documenting typical user journeys.
-
Access and Explore the App
- Go to FRONTEND_ADDRESS in your web browser.
- Log in using your name or email. No password is required.
- Interact with the app to understand its features:
- Observe what happens after logging in.
- Request movie recommendations (e.g., “I feel like watching a fantasy movie”).
- Express your preferences for genres and themes (e.g., “I love movies with funny animals,” or “I dislike violent movies”).
- Check your user profile to see if the app remembers your preferences.
- Log out and log in again to understand the app’s behavior.
Warning: AI platform rate limits in qwiklabs environments can be very low. This might cause the app to fail when chatting with the bot (Oops.. Something went wrong). You can still use the backend to look at how the main page load/login process works, but view the chatbot interactions through this video (with sound turned down).
-
Document User Journeys
- Identify at least two distinct user journeys within the Movie Guru app.
- Clearly document each journey using this format:
- Journey Name: [Give a descriptive name]
- Goal: [What does the user want to achieve?]
- Steps: [List the specific actions the user takes to achieve the goal]
Note: If you need a refresher on what a user journey is, visit the section on What is a user journey? (in Learning Resources).
Success Criteria
To successfully complete this exercise, you should have:
- Identify at least 2 user journeys: Written down 2 UJs in the format mentioned above for the Movie Guru app
- Remember there is no perfect answer.
Learning Resources
What is a User Journey?
In the context of SRE (Site Reliability Engineering), a user journey (UJ) describes the series of steps a user takes to accomplish a specific goal while interacting with a service. It focuses on the user’s perspective and their experience with the system’s performance and reliability. It is like a map that shows the steps a user takes to achieve a goal while using our service. We use this map to understand user behavior, their expectations, and improve their experience.
Here is an example UJ for a typical online webshop:
Example: Adding an Item to an Online Shopping Cart
Goal: Add a desired product to their shopping cart. Steps:
- Browse an e-commerce website.
- Find a product they want to purchase.
- Click the “Add to Cart” button.
- View the updated shopping cart with the added item.
Compare your journeys to the example below: See how your ideas align with the user journeys provided. The examples cover some common interactions, but there will be other ways users interact with the app. There is no perfect answer.
User journeys are hypotheses: They are your best guess about how users will interact with the app. These journeys will need to be refined over time based on real user data and feedback.
Example User Journeys for Movie Guru
Here are a few examples of user journeys for the Movie Guru app:
UJ 1: Access the App
Goal: Start using the Movie Guru app and view the main interface.
Steps:
- Go to the Movie Guru login page.
- The user enters their username.
- Click the “Login” button.
- View the main page. This contains the chatbot, with any chat history loaded (if it exists), and a view of featured films, and profile info (if it exists).
UJ 2: Get Useful Responses
Goal: Receive helpful and relevant responses from the Movie Guru chatbot.
Steps:
- Initiate Chat: The user opens the chat interface in the Movie Guru app.
- The app may have an initial profile with some initial preferences to guide the interaction.
- User Receives a Response:
- Movie Guru provides an initial response based on the user’s input or previous interactions.
- User Explores the Response:
- The user reads and interprets the information provided.
- The user may ask follow-up questions or request clarification.
- User Provides Feedback:
- The user provides explicit feedback (e.g., “This is helpful!” or “I need more information on this”).
- The user may rephrase their query or ask for alternative suggestions.
- User Receives Refined Response:
- Movie Guru refines its response based on the user’s feedback, providing more relevant and helpful information.
- Repeat Steps 2-5 (Optional): The user can continue to interact and provide feedback to further refine the conversation.
- End Chat: The user ends the chat session.
UJ 3: Update Preferences
Goal: Update invalid preferences to personalize future recommendations.
Steps:
- Access Preferences: The user navigates to the “Preferences” or “Profile” section of the home page.
- View Existing Preferences (Optional): The app displays any existing preferences the user has previously saved. This could include:
- Liked/dislikes genres
- Liked/disliked actors
- Liked/disliked directors
- Delete Wrong/Invalid Items: The user interacts with the interface to adjust their preferences. This might involve:
- Receive Confirmation (Optional): The app provides feedback to the user that their preferences have been successfully saved by not rendering the preference again.