Google App Engine is a very powerful but also a mostly unknown service featuring a serverless design. It allowed me to run my php-based website: www.url.rw, that generated more than 12 million page views in July 2018 with zero downtime and scaled perfectly / seamlessly up & down according to my traffic needs. Total costs for that month: 10USD. In this talk I will give a quick introduction on what Google App Engine is, what problems it can (+not) solve and my fight with scaling EC2 hence my love for serverless architecture/design!
2. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
2
TALK
- Why EC2 does not scale
- What Google App Engine is
- How App Engine solved my scaling issue
- Cost considerations
- Downsides
3. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
3
WHO, ME?
DEVOPS AT PRODIGY FINANCE
GUNTER GRODOTZKI
Proud Father living in Cape Town - love
working with Computers!
- Love solving solvable problems
- KISS
- Recently joined the most awesome
company: Prodigy Finance
- Self proclaimed builder
- @lifeofguenter (Twitter / GitHub)
- NANO IS TEH BEST!
4. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
4
WHY DOES EC2 NOT SCALE?
- Most common scaling metric: CPU
- But RAM?
- But IO?
- But connections?
- Spin-up times: 1-5min
- If you get hit, 1min is already too long
- Not an issue on large scales/clusters
- Even if we fix this, we still need to scale MySQL
- AutoScaling is a marketing buzz-word to sell EC2 which is
more expensive than bare-metal
5. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
5
WHAT IS GOOGLE APP ENGINE
- Two types: Standard & Flexible
- This talk is about: Standard (easier scaling)
- A suite of services that are designed in a “web-scale” /
“serverless” fashion
- App Engine => stateless webends (Heroku? Fargate?)
- Datastore => NoSQL / DynamoDB
- Search => Elasticsearch (simplified)
- Memcached => free Shared instance
- Ties well into other Gcloud services
6. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
6
WHAT IS GOOGLE APP ENGINE
- “True” auto-scaling
- No traffic = zero costs
- High traffic = Limitless scaling
- High available (e.g. “LoadBalancer” included)
7. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
7
APP.YAML
8. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
8
INDEX.PHP
10. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
10
REAL WORLD EXAMPLE
- Url.RW -> hides http referer (Site A linking to Site B)
- Site A -> Url.RW -> Site B
- Very simple written PHP application
- No Database
- Goal: deliver as quick, cheap and reliable as possible HTTP
requests
- Cloudflare for some damage control
11.
12.
13.
14.
15. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
15
HOW DID APP ENGINE SOLVE MY SCALING ISSUE?
- Title almost did not fit on the slide
- No DB to worry => easier problem to solve
- High traffic non-the-less
- USP: high availability + low response times
- Running EC2 + ELB too expensive
- DigitalOcean (Droplet + LB) not reliable enough
- App Engine perfectly scaled (and minimised costs on days
where “clients” were jumping ship) and still kept my uptime
at 100%
- 15M page impressions => 10 USD costs in that month
16. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
16
COSTS CONSIDERATION
- EC2 more expensive than rented
dedicated, still we advocate it
- Direct cost comparison does not
always make sense
- Minimum base costs when running
VMs
- Purpose
17. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
17
DOWNSIDES
- Vendor locking
- Lets be real here though…
- Gets expensive on batch processing or if you have a steady
stream of users
- You have to work with the tools (don’t use MySQL) for best
results
- Optimise your application
- Surely a lot more depending on from which angle you look
at it
18. DevOps Days CPT 2018
Gunter Grodotzki
SERVERLESS
GOOGLE APP ENGINE
18
QUESTIONS?