build and manage serverless apis (apidays nordic, may 19th 2016)

Post on 08-Jan-2017

393 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Build and manage Serverless API

Nicolas Grenié Hacker in Residence at 3scale @picsoung

APIdays Nordic 19th May 2016

Tampere, Finland

@picsoung

3scale.net/jobs

700+ clients worldwide

billions of API calls per month

There is hope hype

http://www.commitstrip.com/en/2013/03/11/de-lestimation-de-la-charge/by CommitStrip

common questions you usually ask yourself

on prem vs

cloud

how much storage

how much database

how much server power

Welcome to serverless

era

no servers

no deployments on servers

no software to install

build once scale later

event driven functions

action

reaction

serverless is

2016 PaaS

actors

GoogleCLOUD FUNCTIONS ALPHA

frameworks

101

pay per uselogs with CloudWatch

node, python, Javaauto-scale

AWS Lambda

community projectAWS Lambda

node and pythonhandle rolesminify code

$ sls project create

project structures-project.json // project and author data s-resources-cf.json // CloudFormation template for all stages/regions admin.env // AWS Profiles - gitignored _meta // meta data that holds stage/regions config and

// variables - gitignored |__resources // final CF templates for each stage/region |__s-resources-cf-dev-useast1.json |__variables // variables specific to stages and regions |__s-variables-common.json |__s-variables-dev.json |__s-variables-dev-useast1.json

$sls function create

project structures-project.json // project and author data s-resources-cf.json // CloudFormation template for all stages/regions admin.env // AWS Profiles - gitignored _meta // meta data that holds stage/regions config and

// variables - gitignored |__resources // final CF templates for each stage/region |__s-resources-cf-dev-useast1.json |__variables // variables specific to stages and regions |__s-variables-common.json |__s-variables-dev.json |__s-variables-dev-useast1.json restAPI // folder to group your project functions |__greetings // your first function |__event.json // sample event for testing function locally |__handler.js // your function handler file |__s-function.json // data for your lambda function, endpoints and event sources

$ sls function run

$ sls dash deploy

Manage the API

Manage the APIsimple API keyno self-service

no throttling by keyno segmentation

3scale API management

3scale API managementreduce latencynot in the code

deploy with cloudformation

throttling by keysupport more auth protocol

Try ithttp://bit.ly/API-workshop

Takeaways

serverless = agilitycost effective

lot of platforms/toolsserverless API need to be managed

Build and manage Serverless API

Nicolas Grenié Hacker in Residence at 3scale @picsoung

APIdays Nordic 19th May 2016

Tampere, Finland

top related