SlideShare a Scribd company logo
Move out from AppEngine
and Python PaaS
小海
 StreetVoice / CTO




twitter.com / tzangms
github.com / tzangms
StreetVoice
  recruiting
about
Google App Engine
Pros
you don’t worry about the server
           enviroment
Cons
you worry about money
MyAudioCast
running on app engine over One year
Just a simple website
 that host Podcasts
But burns money
What it use

•   Google AppEngine

•   Django 1.1

•   S3

•   CDN - CDNetworks
    (sponsored by pixnet)
Current stats

•   600+ podcasts

•   900+ episodes

•   220GB storage usage / month

•   60TB bandwidth usage / month

•   6000,000 plays / month
Audience

                                         80%

•   China: 80%

•   Taiwan: 3%

•   Other: 17%                16%
                                    4%




                      China         Taiwan     Other
Page views
AppEngine is GFWed
Why I moved out from
             AppEngine
•   Pricing

•   Performance

•   Deployment

•   Reinvent the wheel
Pricing
Expensive
$4 a day?
$120/month, you can rent Linode 1024 for 3
One Linode 1024
     for now
One Linode 1024
Cost you $39.95
      you save $80
Performance
Frankly,
not good
High error rate
What problem?


•   INSERT logs, 2000+ ops

•   Counter (20 shards), 8000+ ops
1000+ errors
    per day
For now

•   INSERT logs, 35000+ ops

•   Counter (no shards), 60000+ ops
0 errors
Slow Deployment
After click deploy button
I have to wait for
   60 seconds
and 60 seconds
more 60 seconds
zzz ...
10 minutes past...
Finally, it’s done!
I know it’s better now
Reinvent the wheel
Slow development
`pip` is useless
You can not do lots of things
       in easier way
For example
Shard Counter?
Why waste your time?
Just use Redis
 it’s damn easy and stable
Cache
add cache / invalidation
Why waste your time?
use `jonny-cache`
or `cache-machine`
   just add a few lines of code
It's a lot more easier for you to run
       on Linode or other PaaS.
How to move out
and keep your data.
Dump and Prepare your
        data
Generate bulkloader.yaml

appcfg.py create_bulkloader_config 
  --filename=bulkloader.yaml myaudiocast
Dump as csv
appcfg.py download_data 
  --config_file=bulkloader.yaml 
  --filename=users.csv 
  --kind=User myaudiocast
write a script
to read CSV and insert your data into database
The hardest problem
     Foreign Key / relation
Foreign Key
                     with parent

  User     Podcast       Episode           url
tzangms       1           1001     /tzangms/1001/
 lomeer       1           1001      /lomeer/1001/
 william      1           1001      /william/1001/
What?
All the key id of Podcast kind is 1
Some data can’t be dumped
Write it down
 before you dump your data.
How about Auth?
OMG, I don’t have password for user!
Implement Google
     OAuth2
The problem
Poor document
   I can’t find `scope`
       at that time
You need this.
                   weird scope

https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
After almost half year


I still can’t find those scope!
Just use `email` to identify user
        forget the `id` in DataStore
How about Heroku and
  other python PaaS
Python PaaS

•   heroku

•   dotcloud

•   gondor.io

•   ep.io

•   ...
Advantage
                  against AppEngine


•   Pricing

•   Performance

•   Deployment

•   Dynamic configuration
Pricing /
Performance
AppEngine: $120 / mo
                 you can run ...

•   heroku: 4 dynos

•   gondor.io: 4 wsgi server

•   dotcloud: 4 services
But,
how about the performance?
StickerAction
                             for example

•   Running on Heroku

•   One dyno (it means $0)

•   30 reqs / sec

•   No errors

•   Smooth
New Relic
One Dyno is good
    enough
      on heroku
Deployment
Faster than AppEngine!
        Life is short
You can use
any python packages
pip install `package-name`
You dont’ have to
reinvent the wheel
pip install -r requirements.txt

mysql-python             django-bootstrap-form==0.2
django==1.3.1            werkzeug
django-guardian==1.0.3   python-memcached
django-taggit==0.9.3     johnny-cache
django-userena==1.0.2    django-debug-toolbar
django-pagination        south
django-annoying          django-nextpage==0.4
simples3
tweepy
pillow
requests
python-dateutil<2.0
django-extensions
boto
django-storages
django-admin-tools
Dynamic configuration
you can
switch config online
heroku config:add SECRET_KEY=‘xxx’
That’s why I left
  AppEngine
Live Demo
AppEngine is still good
        but not for me
Calling for Proposals
StreetVoice
  recruiting
Any Questions?

More Related Content

PDF
Stream processing in Mercari - Devsumi 2015 autumn LT
PPTX
How to Install Magento on Google Cloud Engine (GCE)
PDF
DevOps tools for everyone - Vagrant, Puppet and Webmin
PDF
Advanced technic for OS upgrading in 3 minutes
PPTX
Getting Started with Heroku
PPTX
Automated Deployments with Ansible
PDF
Web Development with NodeJS
PDF
High-Performance Magento in the Cloud
Stream processing in Mercari - Devsumi 2015 autumn LT
How to Install Magento on Google Cloud Engine (GCE)
DevOps tools for everyone - Vagrant, Puppet and Webmin
Advanced technic for OS upgrading in 3 minutes
Getting Started with Heroku
Automated Deployments with Ansible
Web Development with NodeJS
High-Performance Magento in the Cloud

What's hot (20)

PDF
Load Testing - How to Stress Your Odoo with Locust
PPTX
Oracle on AWS RDS Migration - 성기명
PDF
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
PDF
Wordpress optimization
PDF
PWA 應用 - 實現網站離線瀏覽
PDF
Tips for going fast in a slow world: Michael May at OSCON 2015
PDF
10 Million hits a day with WordPress using a $15 VPS
PDF
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
PDF
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
PDF
Lessons Learned at Wakoopa
PPTX
Joomla! Performance on Steroids
PDF
DevOps - Infrastructure as Code by Andre Marcelo-Tanner
PDF
Building Scalable Websites with Perl
PDF
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
PPTX
WordPress + NGINX Best Practices with EasyEngine
PDF
Orchestration with Ansible at Fedora Project
PDF
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
PPTX
Scaling and Managing Selenium Grid
PDF
Kraken Front-Trends
PDF
Ansible Crash Course
Load Testing - How to Stress Your Odoo with Locust
Oracle on AWS RDS Migration - 성기명
Stupid Boot Tricks: using ipxe and chef to get to boot management bliss
Wordpress optimization
PWA 應用 - 實現網站離線瀏覽
Tips for going fast in a slow world: Michael May at OSCON 2015
10 Million hits a day with WordPress using a $15 VPS
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
Lessons Learned at Wakoopa
Joomla! Performance on Steroids
DevOps - Infrastructure as Code by Andre Marcelo-Tanner
Building Scalable Websites with Perl
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
WordPress + NGINX Best Practices with EasyEngine
Orchestration with Ansible at Fedora Project
Service Delivery Assembly Line with Vagrant, Packer, and Ansible
Scaling and Managing Selenium Grid
Kraken Front-Trends
Ansible Crash Course
Ad

Viewers also liked (8)

PDF
Modern PHP Ch7 Provisioning Guide 導讀
PDF
Modern php ch8 ch9 guide 導讀
PDF
PHP Conf Taiwan 2016 自動化與持續整合實作工作坊
PDF
Composer 從入門到實戰
PDF
快快樂樂打造自動化開發環境
PDF
關於測試,我說的其實是......
PDF
[系列活動] Machine Learning 機器學習課程
PDF
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
Modern PHP Ch7 Provisioning Guide 導讀
Modern php ch8 ch9 guide 導讀
PHP Conf Taiwan 2016 自動化與持續整合實作工作坊
Composer 從入門到實戰
快快樂樂打造自動化開發環境
關於測試,我說的其實是......
[系列活動] Machine Learning 機器學習課程
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
Ad

Similar to Move out from AppEngine, and Python PaaS alternatives (20)

ZIP
Introduction to Google App Engine
PDF
Introduction to App Engine Development
PDF
App Engine On Air: Munich
PDF
Google app-engine-with-python
ODP
Udi Google Dev Day
PDF
App engine devfest_mexico_10
PPTX
Introduction to Google App Engine with Python
PDF
I've (probably) been using Google App Engine for a week longer than you have
PDF
Gentle App Engine Intro
PDF
Google App Engine – niekonwencjonalna platforma aplikacji SaaS do Twojego nas...
PDF
App Engine
PDF
meetPHP#8 - PHP startups prototypes
PDF
What is Google App Engine?
KEY
Django deployment with PaaS
PDF
Introduction to Google App Engine
PDF
Appscale at CLOUDCOMP '09
PDF
Deploy Python apps in 5 min with a PaaS
PPTX
Дмитрий Тарасов: Google App Engine & PHP SDK
PPT
Cloud Computing for Barcamp NOLA 2009
PPT
Introduction to Google App Engine
Introduction to Google App Engine
Introduction to App Engine Development
App Engine On Air: Munich
Google app-engine-with-python
Udi Google Dev Day
App engine devfest_mexico_10
Introduction to Google App Engine with Python
I've (probably) been using Google App Engine for a week longer than you have
Gentle App Engine Intro
Google App Engine – niekonwencjonalna platforma aplikacji SaaS do Twojego nas...
App Engine
meetPHP#8 - PHP startups prototypes
What is Google App Engine?
Django deployment with PaaS
Introduction to Google App Engine
Appscale at CLOUDCOMP '09
Deploy Python apps in 5 min with a PaaS
Дмитрий Тарасов: Google App Engine & PHP SDK
Cloud Computing for Barcamp NOLA 2009
Introduction to Google App Engine

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Cloud computing and distributed systems.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Modernizing your data center with Dell and AMD
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Modernizing your data center with Dell and AMD
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KodekX | Application Modernization Development

Move out from AppEngine, and Python PaaS alternatives

Editor's Notes