Implementing caching in Apigee

Google Cloud Tech · Intermediate ·📰 AI News & Updates ·2y ago

Key Takeaways

Implementing response caching using Apigee's ResponseCache policy to improve API performance, reduce costs, and decrease backend load, with a demonstration of deploying the API accelerator and testing caching effects using curl commands.

Full Transcript

hello and welcome to this episode of the apig accelerator Series in this video you'll see how to improve an api's performance by leveraging aags built in caching policies to improve response times lower costs or decrease load on your backend Services while still being able to scale let's take a high Lev look at how this works with a cash response policy say you have appg in front of the API and a request comes in if the response from the API is not in the cash the request will be forwarded to the Target back end once a response is received it is placed into the cache using the key of your choosing and forwarded to the API client on subsequent requests if the cash lookup succeeds the response is sent immediately to the API client without placing additional load on the target back end now that you've seen the high level overview let's see how to deploy the ex accelerator in order to run this sample you need to have an apx instance provisioned with access configured for external traffic and as a user you'll need to have access to deploy the API proxies this can be granted using either the API admin or or admin roles and lastly to deploy the sample you'll need the command line tool shown here good news is that if you're using Google Cloud shell these are already installed this sample can be demonstrated using either the cloud shell quick start tutorial or following the setup instructions in this video we'll use the cloudshell quick start click open in Google cloudshell to open the cloudshell environment once the environment is loaded let's follow the instructions provided in the tutorial first you will want to make sure that you log in using the right account then we'll navigate naate to the right folder and then open the EnV Dosh file there we're going to set the environment variables to reference your epig project the target environment and the external host name next run the included script to deploy the sample to your appg instance this will take about a minute to complete once it completes you'll see a message with the API proxy URL now to test the effect of caching we'll run a curl command that outputs the total response time take note of the total time from the first request we'll run the same request a subsequent time this time the request will be served from cash as can be seen by the lower response time almost 10x faster in my instance all right now that you've seen this policy in action let's take a look at how this is conf configured in apy in a new tab open the API management UI you can navigate to it from the Google Cloud console by searching for apig in the search bar in the API proxies page you should see the basic caching proxy select the proxy and go to the develop tab you'll see several policies but the one you're interested in right now is the response cach policy this is where you configure the cash key to use how long the item should remain in the cach and conditions for which You Should Skip looking up an item from the cach or placing an item into the cache when you're done with this sample you can switch back to the cloudshell editor to provide us feedback and to use the cleanup script to delete the configuration that was deployed to your apig instance thanks for watching I hope this content was useful to you if you have not signed up for apig yet use this link if you have any questions please visit the apog community and subscribe to our channel to see more videos in the apog accelerator series

Original Description

In this video, you'll learn how to implement response caching using Apigee's ResponseCache policy. For more information on Apigee, please see the documentation → https://goo.gle/4b8lzr9 If you have questions, ask the developer community → https://goo.gle/3pcZML6 To sign up for Apigee → https://goo.gle/3SiZTkF For more Google Cloud Tech and Apigee videos, subscribe → https://goo.gle/GoogleCloudTech​
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Google Cloud Tech · Google Cloud Tech · 0 of 60

← Previous Next →
1 I’m going for it #GoogleCloudCertified
I’m going for it #GoogleCloudCertified
Google Cloud Tech
2 I had to get #GoogleCloudCertified
I had to get #GoogleCloudCertified
Google Cloud Tech
3 Be better overall at what you do #GoogleCloudCertified
Be better overall at what you do #GoogleCloudCertified
Google Cloud Tech
4 Cloud Monitoring on our radar #Analysis #Uptime
Cloud Monitoring on our radar #Analysis #Uptime
Google Cloud Tech
5 Introduction to Generative AI Studio
Introduction to Generative AI Studio
Google Cloud Tech
6 How to use Github Actions with Google's Workload Identity Federation
How to use Github Actions with Google's Workload Identity Federation
Google Cloud Tech
7 Introduction to Responsible AI
Introduction to Responsible AI
Google Cloud Tech
8 Networking updates and CDMC-certified architecture
Networking updates and CDMC-certified architecture
Google Cloud Tech
9 Create and use a Cloud Storage bucket
Create and use a Cloud Storage bucket
Google Cloud Tech
10 How to digitize text from documents
How to digitize text from documents
Google Cloud Tech
11 Faster analytical queries with AlloyDB
Faster analytical queries with AlloyDB
Google Cloud Tech
12 Next ‘23 sessions and FaaS Wave
Next ‘23 sessions and FaaS Wave
Google Cloud Tech
13 Introduction to Assured Open Source Software
Introduction to Assured Open Source Software
Google Cloud Tech
14 BigQuery Cost Optimization: Storage
BigQuery Cost Optimization: Storage
Google Cloud Tech
15 BigQuery Cost Optimization: Compute
BigQuery Cost Optimization: Compute
Google Cloud Tech
16 BigQuery Cost Optimization: Select Queries
BigQuery Cost Optimization: Select Queries
Google Cloud Tech
17 Remote Field Equipment Management with Manufacturing Data Engine
Remote Field Equipment Management with Manufacturing Data Engine
Google Cloud Tech
18 Supercharging your applications with Cloud SQL Enterprise Plus
Supercharging your applications with Cloud SQL Enterprise Plus
Google Cloud Tech
19 Vector Support on our radar #GenAI
Vector Support on our radar #GenAI
Google Cloud Tech
20 Architecting a blockchain startup with Google Cloud
Architecting a blockchain startup with Google Cloud
Google Cloud Tech
21 Kubernetes and multitasking updates!
Kubernetes and multitasking updates!
Google Cloud Tech
22 GKE: Using Kubernetes Events
GKE: Using Kubernetes Events
Google Cloud Tech
23 How to configure firewall rules for Cloud Composer
How to configure firewall rules for Cloud Composer
Google Cloud Tech
24 Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Vertex AI Embeddings API + Matching Engine: Grounding LLMs made easy
Google Cloud Tech
25 Geospatial analytics on our radar #EarthEngine #BigQuery
Geospatial analytics on our radar #EarthEngine #BigQuery
Google Cloud Tech
26 Ensuring requests are set in Kubernetes
Ensuring requests are set in Kubernetes
Google Cloud Tech
27 Cloud Next 2023, Google research program, and more!
Cloud Next 2023, Google research program, and more!
Google Cloud Tech
28 How to migrate projects between organizations with Resource Manager
How to migrate projects between organizations with Resource Manager
Google Cloud Tech
29 How to run #MySQL in Google Cloud
How to run #MySQL in Google Cloud
Google Cloud Tech
30 #GenerativeAI for enterprises and #Next2023
#GenerativeAI for enterprises and #Next2023
Google Cloud Tech
31 How Google Photos scales to store 4 trillion photos and videos
How Google Photos scales to store 4 trillion photos and videos
Google Cloud Tech
32 Google Cross-Cloud Interconnect (Demo 2)
Google Cross-Cloud Interconnect (Demo 2)
Google Cloud Tech
33 GKE Cost Optimization Golden Signals: Introduction
GKE Cost Optimization Golden Signals: Introduction
Google Cloud Tech
34 GKE Cost Optimization Golden Signals: Workload Rightsizing
GKE Cost Optimization Golden Signals: Workload Rightsizing
Google Cloud Tech
35 GKE Load Balancing: Overview
GKE Load Balancing: Overview
Google Cloud Tech
36 GKE Load Balancing: Best Practices
GKE Load Balancing: Best Practices
Google Cloud Tech
37 Disaster Recovery in GKE
Disaster Recovery in GKE
Google Cloud Tech
38 How to configure IP masquerade agent in GKE Standard clusters
How to configure IP masquerade agent in GKE Standard clusters
Google Cloud Tech
39 Enable and use GKE Control plane logs
Enable and use GKE Control plane logs
Google Cloud Tech
40 Compliance in Australia with Assured Workloads
Compliance in Australia with Assured Workloads
Google Cloud Tech
41 Creating budgets and budget alerts in Google Cloud #FinOps
Creating budgets and budget alerts in Google Cloud #FinOps
Google Cloud Tech
42 Cloud SQL Enterprise Plus on our radar #mySQL
Cloud SQL Enterprise Plus on our radar #mySQL
Google Cloud Tech
43 What's Next for Google Cloud?
What's Next for Google Cloud?
Google Cloud Tech
44 How Loveholidays scaled with Contact Center AI
How Loveholidays scaled with Contact Center AI
Google Cloud Tech
45 What is fleet team management in GKE?
What is fleet team management in GKE?
Google Cloud Tech
46 Troubleshoot VPC Network Peering
Troubleshoot VPC Network Peering
Google Cloud Tech
47 Introduction to DocAI and Contact Center AI
Introduction to DocAI and Contact Center AI
Google Cloud Tech
48 Cloud Run Direct VPC egress explained
Cloud Run Direct VPC egress explained
Google Cloud Tech
49 Database deployment options in GKE
Database deployment options in GKE
Google Cloud Tech
50 Analyze cloud billing data with #BigQuery
Analyze cloud billing data with #BigQuery
Google Cloud Tech
51 Tips to becoming a world-class Prompt Engineer
Tips to becoming a world-class Prompt Engineer
Google Cloud Tech
52 Serverless is simple. Do I need CI/CD?
Serverless is simple. Do I need CI/CD?
Google Cloud Tech
53 Accelerating model deployment with MLOps
Accelerating model deployment with MLOps
Google Cloud Tech
54 How Hawaii's Department of Human Services scaled with CCAI
How Hawaii's Department of Human Services scaled with CCAI
Google Cloud Tech
55 Pricing API on our #Radar
Pricing API on our #Radar
Google Cloud Tech
56 How Recommendations AI for Media can boost customer retention
How Recommendations AI for Media can boost customer retention
Google Cloud Tech
57 Troubleshooting: Node Not Ready Status
Troubleshooting: Node Not Ready Status
Google Cloud Tech
58 One weekend until Cloud Next 2023!
One weekend until Cloud Next 2023!
Google Cloud Tech
59 #GoogleCloudNext starts tomorrow!
#GoogleCloudNext starts tomorrow!
Google Cloud Tech
60 #GoogleCloudNext will be demand!
#GoogleCloudNext will be demand!
Google Cloud Tech

This video teaches how to implement response caching using Apigee's ResponseCache policy to improve API performance, reduce costs, and decrease backend load. By following the demonstration, viewers can learn how to deploy the API accelerator, test caching effects, and configure caching policies.

Key Takeaways
  1. Provision an Apigee instance with access configured for external traffic
  2. Deploy the API accelerator using the command line tool
  3. Configure environment variables to reference the Apigee project, target environment, and external host name
  4. Run the included script to deploy the sample to the Apigee instance
  5. Test the effect of caching using curl commands
  6. Configure the ResponseCache policy in the API management UI
💡 Implementing response caching using Apigee's ResponseCache policy can significantly improve API performance, reduce costs, and decrease backend load.

Related Reads

Up next
What will decide the next rally in the Indian stock market? | Sensex | Nifty | Business News
Business Standard
Watch →