Slide 1

Slide 1 text

Geshan.com.np From 0 to working serverless URL for a containerized app Geshan Manandhar Senior Software Engineer Simply Wall St.

Slide 2

Slide 2 text

Geshan.com.np whoami Geshan Manandhar ● Senior Software Engineer ● Tech solution provider 2 ● Google Developer Expert (GDE) - Google Cloud Platform (GCP)

Slide 3

Slide 3 text

I am from Kathmandu, Nepal

Slide 4

Slide 4 text

I work for SimplyWall.st Make confident investment decisions

Slide 5

Slide 5 text

Geshan.com.np Agenda ● What is serverless? Why serverless? ● Containers and why use them ● Current serverless FAAS offering ● Cloud Spectrum ● Google Cloud Run (Serverless + Containers = Bliss) ● Demo ● Projects running on Google Cloud Run 5

Slide 6

Slide 6 text

What is serverless?

Slide 7

Slide 7 text

Geshan.com.np “ Serverless was first used to describe applications that significantly or fully incorporate third-party, cloud-hosted applications and services, to manage server-side logic and state - BAAS. Mike Roberts, Symphonia 7

Slide 8

Slide 8 text

Geshan.com.np “ Serverless can also mean applications where server-side logic is still written by the application developer, but, unlike traditional architectures, it’s run in stateless compute containers that are event-triggered, ephemeral (may only last for one invocation), and fully managed by a third party. - FAAS. Mike Roberts, Symphonia 8

Slide 9

Slide 9 text

Why use serverless?

Slide 10

Slide 10 text

Geshan.com.np Reasons to use Serverless ● Server management is not necessary ● Cost based on precise usage (by the second) ● Inherently scalable (load based autoscaling) ● Implicit high availability ● Quick deployments and updates (Functions) ● Faster to reach a working application (time to market) ● More reasons: https:/ /faasandfurious.com/66 10

Slide 11

Slide 11 text

Focus on your application (code), not the infrastructure

Slide 12

Slide 12 text

Geshan.com.np Serverless (FAAS) Offering (Big 3) 12 Compared in this doc

Slide 13

Slide 13 text

Source: https:/ /faasandfurious.com/91 There are still servers, you don’t have to manage them.

Slide 14

Slide 14 text

What are containers?

Slide 15

Slide 15 text

Geshan.com.np “ A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. - Docker.com 15

Slide 16

Slide 16 text

Why use containers?

Slide 17

Slide 17 text

Geshan.com.np Why use Containers/Docker? ● Ship the whole stack with dependencies - reproducibility ● Efficient resource usage - scale horizontally ● Faster initialization and execution ● Cloud provider agnostic (K8s) ● Dev Side - Quicker onboarding - productive on day 1 17

Slide 18

Slide 18 text

Decrease the distance between Dev and Ops -- SRE

Slide 19

Slide 19 text

Vs There is even a rap battle. Source: https:/ /faasandfurious.com/46

Slide 20

Slide 20 text

Source: https:/ /faasandfurious.com/46

Slide 21

Slide 21 text

Serverless and container evolution in the cloud

Slide 22

Slide 22 text

22 Control Ease / Abstraction Virtual Machine (VM) Containers PAAS Cloud Spectrum Serverless Functions (FaaS)

Slide 23

Slide 23 text

23 Control Ease / Abstraction Virtual Machine (VM) Containers PAAS Serverless Functions (FaaS) Serverless Containers Cloud Spectrum - the sweet spot

Slide 24

Slide 24 text

@geshan Google Cloud Run ● Cloud Run is a managed compute platform that automatically scales your stateless containers. ● Cloud Run is serverless: it abstracts away all infrastructure management, so you can focus on what matters most — building great applications. 24

Slide 25

Slide 25 text

Geshan.com.np Cloud Run advantages ● No need to learn a new paradigm/framework ● Run any language/framework/binary -- as it runs containers (not fixed runtimes) ● Serverless and fully managed ○ Cloud Run on GKE can be self managed (Knative) ● HTTPs URL out of the box ● Custom domains supported ● Leverage the Google Cloud toolset 25

Slide 26

Slide 26 text

Geshan.com.np Cloud Run advantages - contd ● Manage traffic (% traffic to release) – Gradual roll out ● Concurrency - 1 container can handle up to 1000 requests ● Unserverless with just one config - min instances ● Getting from 0 to working URL is very easy ● CI/CD, build packs, startup health check, logs, jobs, monitoring metrics, ○ For more follow Cloud run release notes 26

Slide 27

Slide 27 text

Serverless + Containers = Bliss :)

Slide 28

Slide 28 text

Geshan.com.np https:/ /github.com/geshan/nodejs-postgres-cloud-run Demo time 28

Slide 29

Slide 29 text

Geshan.com.np Demo as video 29

Slide 30

Slide 30 text

Geshan.com.np (Side) projects running on Cloud Run ● Nepal News EN Twitter Bot - 15K followers ○ Aggregates news about Nepal in English from media houses like MyRepublica, The Himalayan Times, Kathmandu Post, RatoPati, SetoPati, The Guardian etc. ● AUTechJobs.com - 1200+ registered users ○ Aggregates jobs from 70+ companies mainly tech focused ones. Currently has 1600+ jobs. The Story behind ATJ. ● Ohcguide.com (Not a side project - in dev) ○ A place to search, compare and buy health insurance for non AU residents/international students. 30

Slide 31

Slide 31 text

Geshan.com.np 31 Thanks! Any questions? You can find me at ◉ @geshan ◉ Geshan.com.np ◉ LinkedIn LinkedIn profile ☝

Slide 32

Slide 32 text

Geshan.com.np Credits/references ● https:/ /martinfowler.com/articles/serverless.html ● https:/ /www.cloudflare.com/learning/serverless/why-use-serverless/ ● https:/ /hackernoon.com/what-is-serverless-architecture-what-are-its-pros-and-cons-cc4b804022e9 ● https:/ /pixabay.com/photos/sea-cumulus-cloud-boat-clouds-84629/ ● https:/ /pixabay.com/photos/computer-computer-code-screen-1209641/ ● https:/ /faasandfurious.com/46 - Tribal warfare Serverless vs Containers ● https:/ /pixabay.com/photos/hamburg-port-of-hamburg-3021820/ ● https:/ /techbeacon.com/app-dev-testing/3-reasons-why-you-should-always-run-microservices-apps-containers ● https:/ /pixabay.com/photos/chimpanzee-monkey-ape-mammal-zoo-3703230/ ● https:/ /www.youtube.com/watch?v=q9Wa5KJURec ● https:/ /pixabay.com/photos/connect-connection-cooperation-20333/ ● https:/ /www.bbva.com/en/serverless/ ● https:/ /docs.google.com/spreadsheets/d/1mYbr5FH7nScDQwVjKhJj3rtk9M-9LzBppBKi_cq3BEw/edit?usp=sharing - Serverless Comparison Sheet ● https:/ /medium.com/google-cloud/cloud-run-vs-cloud-functions-whats-the-lowest-cost-728d59345a2e ● https:/ /medium.com/@keithwhor/rise-of-functions-as-a-service-how-php-set-the-serverless-stage-20-years-ago-ccb560c5f422 ● https:/ /withinboredom.info/2018/12/23/serverless-from-a-php-developers-experience/ ● https:/ /news.ycombinator.com/item?id=16407290 ● https:/ /www.gartner.com/smarterwithgartner/top-trends-in-the-gartner-hype-cycle-for-emerging-technologies-2017/ ● https:/ /geshan.com.np/blog/2019/11/why-use-google-cloud-run-5-compelling-reasons/ ● https:/ /symphonia.io/what-is-serverless.pdf ● https:/ /www.trek10.com/blog/think-faas-serverless-vs-containers ● 32