Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Deploying to AppEngine

89 views

Published on

In this presentation we will talk about voting service, based on components written in Python, dot Net, NodeJS and redis, postgresql.

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Deploying to AppEngine

  1. 1. Deploying to AppEngine
  2. 2. ⇒ Whoami Alex Hayorov @hayorov We
  3. 3. Cats vs Dogs voting
  4. 4. Choose Get the results
  5. 5. Our applicationArchitecture • Multiplatform design https://github.com/hayorov/example-voting-app • Dockerized • Hosted in Docker VM
  6. 6. Our applicationVoting-app GET / voting-appPOST / vote: a rpush voter_id, vote •Flask (python 2.7-alpine) •Gunicorn •Redis (TCP)
  7. 7. New project on cloud.google.com Install Google Cloud Platform SDK (gcloud) runtime: python27 api_version: 1 threadsafe: true handlers: - url: / script: app.app - url: /static static_dir: static Create app.yaml file
  8. 8. ⇒ gcloud app deploy --project catsdogsvote You are about to deploy the following services: - catsdogsvote/default/20161120t203231 (from [example-voting-app/vote/app.yaml]) Deploying to URL: [https://catsdogsvote.appspot.com] Beginning deployment of service [default]... File upload done. Updating service [default]...done. Deployed service [default] to [https://catsdogsvote.appspot.com] goto https://catsdogsvote.appspot.com
  9. 9. Collecting Flask (from -r requirements.txt (line 1)) Using cached Flask-0.11.1.tar.gz … Running setup.py install for Flask ... done Running setup.py install for Redis ... done Running setup.py install for gunicorn ... done Successfully installed Flask Jinja2-2.8 MarkupSafe-0.23 Redis Werkzeug click gunicorn itsdangerous- 0.24 ⇒ virtualenv ./env && pip install -r requirements.txt #fixme Create appengine_config.py from google.appengine.ext import vendor vendor.add('env/lib/python2.7/site-packages') ⇒ gcloud app deploy --project catsdogsvote
  10. 10. Choose Get the results powered by AppEngine
  11. 11. rps-instances/time t, secs rps 1k 100 Count: 321612 Load: line(1, 1000, 10m) const(100, 5m) HTTP codes Count Percent 200 - OK 65.2% (430490) 500 - Error 32.2% (212734) ??? - Error 2.6% (17306) workload 300 600 created instances 183 Response time distribution time, s quantile 12000 100 5000 87 1000 71 500 63 350 41 150 4

×