SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
App Engine Memcache Basics
App Engine: Memcache Basics

Who? Why?
Ido Green
Solutions Architect
plus.google.com/greenido

greenido.wordpress.com
App Engine: Memcache Basics

Topics We Cover in This Lesson
● What is Memcache?
● Why do we need Memcache?
● How to Use Memcache?
● Caveats And Solutions
App Engine: Memcache Basics

What Is Memcache?
What is Memcache?

What is Memcache?
● Memcache is an in-memory Key-Value Pairs data store
○ Put a value with a key
○ Get a value with a key
value

key
"user001" : "John Doe"

"user002" : "Larry Page"

● key or value can be anything that is serializable
● Memcache is a shared service accessed via App Engine APIs.
What Is Memcache

What Do We Use Memcache For?
●

●

●

Caching In Front of Datastore
○ Cache entities for low-latency reads
○ Integrated into most ORM frameworks (ndb, Obectify ..)
Caching for Read heavy operations
○ User authentication token and session data
○ APIs call or other computation results
Semi-durable Shared state Cross App Instances
○ Sessions
○ Counters / Metrics
○ Application Configurations
App Engine: Memcache Basics

Why Do We Need Memcache?
Why do we need Memcache?

Why Do We Use Memcache?

● Improve Application Performance
● Reduce Application Cost
Why do we need Memcache?

How Fast Can Memcache be? And How Much?

Datastore Query Latency

Memcache Read Latency
How to Use Memcache
How to Use Memcache

Memcache APIs
● Java
○ JCache APIs
○ GAE Low-Level Memcache APIs
○ Objectify for Datastore

● Python
○ google.appengine.api.memcache module
○ ndb for Datastore
How to Use Memcache

General Memcache Usage Pattern
Coordinate data read with Datastore:
● Check if Memcache value exists
○ if it does, display/use cached value directly; otherwise
○ fetch the value from Datastore and write the value to
Memcache

Coordinate data write with Datastore:
● Update Memcache value
○ to handle race condition, leverage put if
untouched/compare and set to detect race conditions

● Write the value to Datastore
○ optionally, leverage the task queue for background writes
How to Use Memcache

Using GAE Client Library (Java)
import com.google.appengine.api.memcache;
...
MemcacheService syncCache = MemcacheServiceFactory.
getMemcacheService();
// Act on error as cache miss
syncCache.setErrorHandler(ErrorHandlers.
getConsistentLogAndContinue(Level.INFO));
value = (byte[]) syncCache.get(key); // read from cache
if (value == null) {
value = getDataFromDb(key); // fetch value from datastore
syncCache.put(key, value); // write to cache
// (key and value must be
serializable)
}
...
How to Use Memcache

Using GAE Client Library (Python)
from google.appengine.api import memcache
...
value = memcache.get(key)
if value is None:
value = get_value_from_db(key)
if not memcache.add(key, value):
logging.error('Memcache add failed.')
...
How to Use Memcache

Batch Operations
● getAll(), putAll(), deleteAll()
A single read or write operation for multiple memcache
entries

Note

● Further improve Memcache performance by reducing network traffics
● Batch size < 32 MB
How to Use Memcache

Atomic Operations
● increment(key, delta), incrementAll(...),
Provide atomic increment of numeric value(s)
● getIdentifiable(), putIfUntouched() in Java, or cas() in Python
A mechanism to update a value consistently by concurrent requests

Note

●

Helps managing memcache data consistency in
multi-instances/concurrent environment
How to Use Memcache

Some Other Features
● Asynchronous calls
Provides a mechanism to make a non-blocking call for memcache
operations
● Namespace
Logically separates data layers for different application purposes (like
multi tenancy) across many GAE services such as Datastore,
Memcache, Task Queue etc...
Caveats And Solutions
Caveats And Solutions
Caveat: Memcache Is Volatile
Entries can be evicted anytime by various reasons:
●
●
●

entry reaches expiration
entry is evicted because memcache memory is full
memcache server fails
Tip
●

It's important to handle cache-miss gracefully!

●

Implements write-through logic by backing
memcache with datastore in your application!
○ Psst... Objectify and ndb do it for you.
Caveats And Solutions
Caveat: Memcache Is Not Transactional
Instance 1 reads $100

$100

$100

Instance 2 reads $100

$100

$100

Instance 2 deducts $20

$80

$80

Instance 1 deducts $30

$70

$70

Tip
Using getIdentifiable() and putIfUntouched(...)
for optimistic locking
Caveats And Solutions
Caveat: Memcache Is A Limited Resource
My Application Does NOT Have Enough Memcache!

Tips
●

Only need to cache what is useful and necessary!

●

Your application should function without memcache!

●

Dedicated Memcache
Caveats And Solutions
Dedicated Memcache

Enabling dedicated memcache from the admin console

1. Provides fixed cache capacity that is exclusive to your application
2. Billed by the GB per hour of cache size. Charged in 15 minute
increments
3. Gives you additional control over cache size. More predictable
performance
Note: Whether shared or dedicated, Memcache is not a durable storage.
Plan for your application to function without Memcache
Discussion And Questions

Key Takeaways
1. Memcache is supported natively in GAE. Take advantage of it to
improve your GAE application performance.
2. Memcache supports open standard JCache API. Many advanced
features are available by GAE Memcache APIs to suit your
application's need i.e. Batch, Atomic, Asynchronous operations
3. Seamless integration with GAE Datastore in a few libraries like
Python ndb and Java Objectify.
4. Read-frequently and write-rarely data is most suitable in combining
with Memcache
5. Handle Memcache's volatility in your application
6. Use Memcache wisely, it is not an unlimited resource
App Engine: Memcache Basics

Thank you!
Questions?

Weitere ähnliche Inhalte

Was ist angesagt?

Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...
Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...
Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...Vietnam Open Infrastructure User Group
 
20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)rootfs32
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Amazon Web Services
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Vietnam Open Infrastructure User Group
 
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기Amazon Web Services Korea
 
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Sean Cohen
 
Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Roman Pickl
 
Gioi thieu openstack-manila
Gioi thieu openstack-manilaGioi thieu openstack-manila
Gioi thieu openstack-manilaCông TÔ
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Idan Atias
 
Improving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringImproving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringScyllaDB
 
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈Amazon Web Services Korea
 
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPC
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPCHPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPC
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPCHPC DAY
 
Presto, Zeppelin을 이용한 초간단 BI 구축 사례
Presto, Zeppelin을 이용한 초간단 BI 구축 사례Presto, Zeppelin을 이용한 초간단 BI 구축 사례
Presto, Zeppelin을 이용한 초간단 BI 구축 사례Hyoungjun Kim
 
Monitoring, the Prometheus Way - Julius Voltz, Prometheus
Monitoring, the Prometheus Way - Julius Voltz, Prometheus Monitoring, the Prometheus Way - Julius Voltz, Prometheus
Monitoring, the Prometheus Way - Julius Voltz, Prometheus Docker, Inc.
 
DataPower Security Hardening
DataPower Security HardeningDataPower Security Hardening
DataPower Security HardeningShiu-Fun Poon
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocketsametmax
 
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관제관 이
 
Hypervisors Vs Bare Metal Servers: a Beginner’s Guide
Hypervisors Vs Bare Metal Servers: a Beginner’s GuideHypervisors Vs Bare Metal Servers: a Beginner’s Guide
Hypervisors Vs Bare Metal Servers: a Beginner’s GuideGlobalTeleHost Corp.
 

Was ist angesagt? (20)

Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...
Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...
Room 3 - 4 - Lê Quang Hiếu - How to be a cool dad: Leverage DIY Home Automati...
 
20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)20150511 jun lee_openstack neutron 분석 (최종)
20150511 jun lee_openstack neutron 분석 (최종)
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
 
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
AWS Finance Symposium_바로 도입할 수 있는 금융권 업무의 클라우드 아키텍처 알아보기
 
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
 
Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)Continuous delivery with jenkins pipelines (@devfest Vienna)
Continuous delivery with jenkins pipelines (@devfest Vienna)
 
Gioi thieu openstack-manila
Gioi thieu openstack-manilaGioi thieu openstack-manila
Gioi thieu openstack-manila
 
Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)Introduction to Container Storage Interface (CSI)
Introduction to Container Storage Interface (CSI)
 
Improving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error MonitoringImproving Performance of Micro-Frontend Applications through Error Monitoring
Improving Performance of Micro-Frontend Applications through Error Monitoring
 
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
[Gaming on AWS] AWS와 함께 한 쿠키런 서버 Re-architecting 사례 - 데브시스터즈
 
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPC
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPCHPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPC
HPC DAY 2017 | HPE Strategy And Portfolio for AI, BigData and HPC
 
Presto, Zeppelin을 이용한 초간단 BI 구축 사례
Presto, Zeppelin을 이용한 초간단 BI 구축 사례Presto, Zeppelin을 이용한 초간단 BI 구축 사례
Presto, Zeppelin을 이용한 초간단 BI 구축 사례
 
Monitoring, the Prometheus Way - Julius Voltz, Prometheus
Monitoring, the Prometheus Way - Julius Voltz, Prometheus Monitoring, the Prometheus Way - Julius Voltz, Prometheus
Monitoring, the Prometheus Way - Julius Voltz, Prometheus
 
DataPower Security Hardening
DataPower Security HardeningDataPower Security Hardening
DataPower Security Hardening
 
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over WebsocketIntroduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
 
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
1시간으로 끝내는 클라우드 개념_김민형 클라우드 솔루션 아키텍트
 
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관
마이크로서비스 아키텍처 기반의 의료정보시스템 고도화 전환사례.건국대학교병원.이제관
 
Hypervisors Vs Bare Metal Servers: a Beginner’s Guide
Hypervisors Vs Bare Metal Servers: a Beginner’s GuideHypervisors Vs Bare Metal Servers: a Beginner’s Guide
Hypervisors Vs Bare Metal Servers: a Beginner’s Guide
 
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practiceRoom 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
Room 2 - 1 - Phạm Quang Minh - A real DevOps culture in practice
 

Andere mochten auch

Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3Simon Su
 
Hack+FuelPHPによるWebサービス開発
Hack+FuelPHPによるWebサービス開発Hack+FuelPHPによるWebサービス開発
Hack+FuelPHPによるWebサービス開発Yuji Otani
 
HTML5 Experts.jp パフォーマンス・チューニング
HTML5 Experts.jp パフォーマンス・チューニングHTML5 Experts.jp パフォーマンス・チューニング
HTML5 Experts.jp パフォーマンス・チューニングYusuke Naka
 
HHVM on CentOS6 本番運用のうまみとつらみ
HHVM on CentOS6 本番運用のうまみとつらみHHVM on CentOS6 本番運用のうまみとつらみ
HHVM on CentOS6 本番運用のうまみとつらみKei KORI
 
PHP7がリリースされたいま、 改めてHackについて考える。
PHP7がリリースされたいま、 改めてHackについて考える。PHP7がリリースされたいま、 改めてHackについて考える。
PHP7がリリースされたいま、 改めてHackについて考える。Yuji Otani
 
PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由Yuji Otani
 
liceo paola cs
liceo paola csliceo paola cs
liceo paola csgueroz4
 
Innova day 5^ ed Nanotech - Biomed - Biotech 18 Oct. 2013
Innova day 5^ ed   Nanotech - Biomed - Biotech 18 Oct. 2013Innova day 5^ ed   Nanotech - Biomed - Biotech 18 Oct. 2013
Innova day 5^ ed Nanotech - Biomed - Biotech 18 Oct. 2013Francesco Baruffi
 
Dec 06, Sermon Am
Dec 06, Sermon AmDec 06, Sermon Am
Dec 06, Sermon AmGeo Acts
 
Locandina oleodinamica 2010 fluid power 6 ed def
Locandina oleodinamica 2010 fluid power 6 ed defLocandina oleodinamica 2010 fluid power 6 ed def
Locandina oleodinamica 2010 fluid power 6 ed defFrancesco Baruffi
 
Retrospective 2008 The Surfer’s Year
Retrospective 2008 The Surfer’s YearRetrospective 2008 The Surfer’s Year
Retrospective 2008 The Surfer’s Yearsdelastic
 
Wiki Technology By It Rocks
Wiki Technology By It RocksWiki Technology By It Rocks
Wiki Technology By It Rocksnaveenv
 
Java Eye Architecture
Java Eye ArchitectureJava Eye Architecture
Java Eye ArchitectureRobbin Fan
 
Unit1Business-English
Unit1Business-EnglishUnit1Business-English
Unit1Business-Englishlola guillen
 
Tally Sheet Results - Technology Habits
Tally Sheet Results - Technology HabitsTally Sheet Results - Technology Habits
Tally Sheet Results - Technology Habitsleouy
 

Andere mochten auch (20)

Google App Engine Developer - Day3
Google App Engine Developer - Day3Google App Engine Developer - Day3
Google App Engine Developer - Day3
 
Hack+FuelPHPによるWebサービス開発
Hack+FuelPHPによるWebサービス開発Hack+FuelPHPによるWebサービス開発
Hack+FuelPHPによるWebサービス開発
 
HTML5 Experts.jp パフォーマンス・チューニング
HTML5 Experts.jp パフォーマンス・チューニングHTML5 Experts.jp パフォーマンス・チューニング
HTML5 Experts.jp パフォーマンス・チューニング
 
HHVM on CentOS6 本番運用のうまみとつらみ
HHVM on CentOS6 本番運用のうまみとつらみHHVM on CentOS6 本番運用のうまみとつらみ
HHVM on CentOS6 本番運用のうまみとつらみ
 
PHP7がリリースされたいま、 改めてHackについて考える。
PHP7がリリースされたいま、 改めてHackについて考える。PHP7がリリースされたいま、 改めてHackについて考える。
PHP7がリリースされたいま、 改めてHackについて考える。
 
PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由PHP7ではなくHack/HHVMを選ぶ理由
PHP7ではなくHack/HHVMを選ぶ理由
 
liceo paola cs
liceo paola csliceo paola cs
liceo paola cs
 
Innova day 5^ ed Nanotech - Biomed - Biotech 18 Oct. 2013
Innova day 5^ ed   Nanotech - Biomed - Biotech 18 Oct. 2013Innova day 5^ ed   Nanotech - Biomed - Biotech 18 Oct. 2013
Innova day 5^ ed Nanotech - Biomed - Biotech 18 Oct. 2013
 
Dec 06, Sermon Am
Dec 06, Sermon AmDec 06, Sermon Am
Dec 06, Sermon Am
 
Locandina oleodinamica 2010 fluid power 6 ed def
Locandina oleodinamica 2010 fluid power 6 ed defLocandina oleodinamica 2010 fluid power 6 ed def
Locandina oleodinamica 2010 fluid power 6 ed def
 
Retrospective 2008 The Surfer’s Year
Retrospective 2008 The Surfer’s YearRetrospective 2008 The Surfer’s Year
Retrospective 2008 The Surfer’s Year
 
Sf 02S201test
Sf 02S201testSf 02S201test
Sf 02S201test
 
VANABBETOTVESSEM
VANABBETOTVESSEMVANABBETOTVESSEM
VANABBETOTVESSEM
 
Collaborative Assessment
Collaborative AssessmentCollaborative Assessment
Collaborative Assessment
 
Wiki Technology By It Rocks
Wiki Technology By It RocksWiki Technology By It Rocks
Wiki Technology By It Rocks
 
Java Eye Architecture
Java Eye ArchitectureJava Eye Architecture
Java Eye Architecture
 
Unit1Business-English
Unit1Business-EnglishUnit1Business-English
Unit1Business-English
 
Presentation1
Presentation1Presentation1
Presentation1
 
Europe
EuropeEurope
Europe
 
Tally Sheet Results - Technology Habits
Tally Sheet Results - Technology HabitsTally Sheet Results - Technology Habits
Tally Sheet Results - Technology Habits
 

Ähnlich wie Memcache basics on google app engine

How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcachevaluebound
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
 
Lonestar php scalingmagento
Lonestar php scalingmagentoLonestar php scalingmagento
Lonestar php scalingmagentoMathew Beane
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetAchieve Internet
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Introduction to Magento Optimization
Introduction to Magento OptimizationIntroduction to Magento Optimization
Introduction to Magento OptimizationFabio Daniele
 
Large scale virtual Machine log collector (Project-Report)
Large scale virtual Machine log collector (Project-Report)Large scale virtual Machine log collector (Project-Report)
Large scale virtual Machine log collector (Project-Report)Gaurav Bhardwaj
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedAcquia
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlabMuhammad Alli
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Servervarien
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for WindowsFord AntiTrust
 
Zendcon scaling magento
Zendcon scaling magentoZendcon scaling magento
Zendcon scaling magentoMathew Beane
 
Caching Tips & Tricks
Caching Tips & TricksCaching Tips & Tricks
Caching Tips & TricksOutSystems
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialWim Godden
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourWim Godden
 

Ähnlich wie Memcache basics on google app engine (20)

How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcache
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
Lonestar php scalingmagento
Lonestar php scalingmagentoLonestar php scalingmagento
Lonestar php scalingmagento
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Improving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve InternetImproving Website Performance with Memecached Webinar | Achieve Internet
Improving Website Performance with Memecached Webinar | Achieve Internet
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Introduction to Magento Optimization
Introduction to Magento OptimizationIntroduction to Magento Optimization
Introduction to Magento Optimization
 
Large scale virtual Machine log collector (Project-Report)
Large scale virtual Machine log collector (Project-Report)Large scale virtual Machine log collector (Project-Report)
Large scale virtual Machine log collector (Project-Report)
 
Improving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with MemcachedImproving Website Performance and Scalability with Memcached
Improving Website Performance and Scalability with Memcached
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
 
Caching in rails
Caching in railsCaching in rails
Caching in rails
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
 
Zendcon scaling magento
Zendcon scaling magentoZendcon scaling magento
Zendcon scaling magento
 
Caching Tips & Tricks
Caching Tips & TricksCaching Tips & Tricks
Caching Tips & Tricks
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorial
 
Memcache d
Memcache dMemcache d
Memcache d
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
 

Mehr von Ido Green

How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta Ido Green
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Ido Green
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereIdo Green
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitIdo Green
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantageIdo Green
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Ido Green
 
Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Ido Green
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?Ido Green
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)Ido Green
 
Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Ido Green
 
Building conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleBuilding conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleIdo Green
 
Actions On Google - How? Why?
Actions On Google - How? Why?Actions On Google - How? Why?
Actions On Google - How? Why?Ido Green
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best PracticesIdo Green
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For StartupsIdo Green
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobIdo Green
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?Ido Green
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Ido Green
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesIdo Green
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWAIdo Green
 

Mehr von Ido Green (20)

How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta How to get things done - Lessons from Yahoo, Google, Netflix and Meta
How to get things done - Lessons from Yahoo, Google, Netflix and Meta
 
Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]Crypto 101 and a bit more [Sep-2022]
Crypto 101 and a bit more [Sep-2022]
 
The Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is HereThe Future of Continuous Software Updates Is Here
The Future of Continuous Software Updates Is Here
 
Open Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core SummitOpen Source & DevOps Market trends - Open Core Summit
Open Source & DevOps Market trends - Open Core Summit
 
DevOps as a competitive advantage
DevOps as a competitive advantageDevOps as a competitive advantage
DevOps as a competitive advantage
 
Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)Data Driven DevOps & Technologies (swampUP 2019 keynote)
Data Driven DevOps & Technologies (swampUP 2019 keynote)
 
Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!Create An Amazing Apps For The Google Assistant!
Create An Amazing Apps For The Google Assistant!
 
VUI Design
VUI DesignVUI Design
VUI Design
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?
 
The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)The Google Assistant - Macro View (October 2017)
The Google Assistant - Macro View (October 2017)
 
Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017Actions On Google - GDD Europe 2017
Actions On Google - GDD Europe 2017
 
Building conversational experiences with Actions on Google
Building conversational experiences with Actions on GoogleBuilding conversational experiences with Actions on Google
Building conversational experiences with Actions on Google
 
Actions On Google - How? Why?
Actions On Google - How? Why?Actions On Google - How? Why?
Actions On Google - How? Why?
 
Startups Best Practices
Startups Best PracticesStartups Best Practices
Startups Best Practices
 
Progressive Web Apps For Startups
Progressive Web Apps For StartupsProgressive Web Apps For Startups
Progressive Web Apps For Startups
 
Earn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMobEarn More Revenue With Firebase and AdMob
Earn More Revenue With Firebase and AdMob
 
How To Grow Your User Base?
How To Grow Your User Base?How To Grow Your User Base?
How To Grow Your User Base?
 
Amp Overview #YGLF 2016
Amp Overview #YGLF 2016Amp Overview #YGLF 2016
Amp Overview #YGLF 2016
 
AMP - Accelerated Mobile Pages
AMP - Accelerated Mobile PagesAMP - Accelerated Mobile Pages
AMP - Accelerated Mobile Pages
 
From AMP to PWA
From AMP to PWAFrom AMP to PWA
From AMP to PWA
 

Kürzlich hochgeladen

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Memcache basics on google app engine

  • 2. App Engine: Memcache Basics Who? Why? Ido Green Solutions Architect plus.google.com/greenido greenido.wordpress.com
  • 3. App Engine: Memcache Basics Topics We Cover in This Lesson ● What is Memcache? ● Why do we need Memcache? ● How to Use Memcache? ● Caveats And Solutions
  • 4. App Engine: Memcache Basics What Is Memcache?
  • 5. What is Memcache? What is Memcache? ● Memcache is an in-memory Key-Value Pairs data store ○ Put a value with a key ○ Get a value with a key value key "user001" : "John Doe" "user002" : "Larry Page" ● key or value can be anything that is serializable ● Memcache is a shared service accessed via App Engine APIs.
  • 6. What Is Memcache What Do We Use Memcache For? ● ● ● Caching In Front of Datastore ○ Cache entities for low-latency reads ○ Integrated into most ORM frameworks (ndb, Obectify ..) Caching for Read heavy operations ○ User authentication token and session data ○ APIs call or other computation results Semi-durable Shared state Cross App Instances ○ Sessions ○ Counters / Metrics ○ Application Configurations
  • 7. App Engine: Memcache Basics Why Do We Need Memcache?
  • 8. Why do we need Memcache? Why Do We Use Memcache? ● Improve Application Performance ● Reduce Application Cost
  • 9. Why do we need Memcache? How Fast Can Memcache be? And How Much? Datastore Query Latency Memcache Read Latency
  • 10. How to Use Memcache
  • 11. How to Use Memcache Memcache APIs ● Java ○ JCache APIs ○ GAE Low-Level Memcache APIs ○ Objectify for Datastore ● Python ○ google.appengine.api.memcache module ○ ndb for Datastore
  • 12. How to Use Memcache General Memcache Usage Pattern Coordinate data read with Datastore: ● Check if Memcache value exists ○ if it does, display/use cached value directly; otherwise ○ fetch the value from Datastore and write the value to Memcache Coordinate data write with Datastore: ● Update Memcache value ○ to handle race condition, leverage put if untouched/compare and set to detect race conditions ● Write the value to Datastore ○ optionally, leverage the task queue for background writes
  • 13. How to Use Memcache Using GAE Client Library (Java) import com.google.appengine.api.memcache; ... MemcacheService syncCache = MemcacheServiceFactory. getMemcacheService(); // Act on error as cache miss syncCache.setErrorHandler(ErrorHandlers. getConsistentLogAndContinue(Level.INFO)); value = (byte[]) syncCache.get(key); // read from cache if (value == null) { value = getDataFromDb(key); // fetch value from datastore syncCache.put(key, value); // write to cache // (key and value must be serializable) } ...
  • 14. How to Use Memcache Using GAE Client Library (Python) from google.appengine.api import memcache ... value = memcache.get(key) if value is None: value = get_value_from_db(key) if not memcache.add(key, value): logging.error('Memcache add failed.') ...
  • 15. How to Use Memcache Batch Operations ● getAll(), putAll(), deleteAll() A single read or write operation for multiple memcache entries Note ● Further improve Memcache performance by reducing network traffics ● Batch size < 32 MB
  • 16. How to Use Memcache Atomic Operations ● increment(key, delta), incrementAll(...), Provide atomic increment of numeric value(s) ● getIdentifiable(), putIfUntouched() in Java, or cas() in Python A mechanism to update a value consistently by concurrent requests Note ● Helps managing memcache data consistency in multi-instances/concurrent environment
  • 17. How to Use Memcache Some Other Features ● Asynchronous calls Provides a mechanism to make a non-blocking call for memcache operations ● Namespace Logically separates data layers for different application purposes (like multi tenancy) across many GAE services such as Datastore, Memcache, Task Queue etc...
  • 19. Caveats And Solutions Caveat: Memcache Is Volatile Entries can be evicted anytime by various reasons: ● ● ● entry reaches expiration entry is evicted because memcache memory is full memcache server fails Tip ● It's important to handle cache-miss gracefully! ● Implements write-through logic by backing memcache with datastore in your application! ○ Psst... Objectify and ndb do it for you.
  • 20. Caveats And Solutions Caveat: Memcache Is Not Transactional Instance 1 reads $100 $100 $100 Instance 2 reads $100 $100 $100 Instance 2 deducts $20 $80 $80 Instance 1 deducts $30 $70 $70 Tip Using getIdentifiable() and putIfUntouched(...) for optimistic locking
  • 21. Caveats And Solutions Caveat: Memcache Is A Limited Resource My Application Does NOT Have Enough Memcache! Tips ● Only need to cache what is useful and necessary! ● Your application should function without memcache! ● Dedicated Memcache
  • 22. Caveats And Solutions Dedicated Memcache Enabling dedicated memcache from the admin console 1. Provides fixed cache capacity that is exclusive to your application 2. Billed by the GB per hour of cache size. Charged in 15 minute increments 3. Gives you additional control over cache size. More predictable performance Note: Whether shared or dedicated, Memcache is not a durable storage. Plan for your application to function without Memcache
  • 23. Discussion And Questions Key Takeaways 1. Memcache is supported natively in GAE. Take advantage of it to improve your GAE application performance. 2. Memcache supports open standard JCache API. Many advanced features are available by GAE Memcache APIs to suit your application's need i.e. Batch, Atomic, Asynchronous operations 3. Seamless integration with GAE Datastore in a few libraries like Python ndb and Java Objectify. 4. Read-frequently and write-rarely data is most suitable in combining with Memcache 5. Handle Memcache's volatility in your application 6. Use Memcache wisely, it is not an unlimited resource
  • 24. App Engine: Memcache Basics Thank you! Questions?