Upload
vivek-p-s
View
143
Download
0
Embed Size (px)
Citation preview
Serverless With Azure FunctionsDec 3rd 2016
Vivek. P.S
Vivek. P.S
http://vivekcek.wordpress.com
Vivek P.SSystem Analyst @ Ust GlobalTech Evangelist Blogger
http://[email protected]
Agenda• Why Serverless?• What is serverless? • Intro Azure Functions• Serverless patterns / Real-world examples
Before cloud
On-PremiseCo-Lo
Before cloud
How many servers do I need?
Which OS should I use?
How often should I patch my servers?
What size of servers
should I buy?
How often should I backup
my server?
How can I increase server utilization?
How I deploy new code to my server?
Which packages should be on my server?
It takes how long to provision a new server?
Are my server in a
secure location?
What happens if
the
power goes out?Do I n
eed secondary
network connection?
What is th
e right si
ze of
servers for m
y business n
eeds?
Who has physical
access to my servers?
Do I need a UPS?
What media should I
use to keep backup?
What storage I need to use?
How I scale my app?
What happens in case of
server hardware failure?
How can I d
ynamically
configure my app?
Who monitors
my Servers?Who monitors
my App?
Then came IaaS …
How many servers do I need?
Which OS should I use?
How often should I patch my servers?
What size of servers
should I buy?
How often should I backup
my server?
How can I increase server utilization?
How I deploy new code to my server?
Which packages should be on my server?
It takes how long to provision a new server?
Are my server in a
secure location?
What happens if
the
power goes out?Do I n
eed secondary
network connection?
What is th
e right si
ze of
servers for m
y business n
eeds?
Who has physical
access to my servers?
Do I need a UPS?
What media should I
use to keep backup?
What storage I need to use?
How I scale my app?
What happens in case of
server hardware failure?
How can I d
ynamically
configure my app?
Who monitors
my Servers?Who monitors
my App?
Is it PaaS time?
How many servers do I need?
Which OS should I use?
How often should I patch my servers?
How often should I backup
my server?
How can I increase server utilization?
How I deploy new code to my server?
Which packages should be on my server?
What is th
e right si
ze of
servers for m
y business n
eeds?
How I scale my app?
How can I d
ynamically
configure my app?
Who monitors
my App?
Is it PaaS time?
How many servers do I need?
Which OS should I use?
How often should I patch my servers?
How often should I backup
my server?
How can I increase server utilization?
How I deploy new code to my server?
Which packages should be on my server?
What is th
e right si
ze of
servers for m
y business n
eeds?
How I scale my app?
How can I d
ynamically
configure my app?
Who monitors
my App?
Serverless . . .
How many servers do I need?
How can I increase server utilization?What is
the rig
ht size of
servers for m
y business n
eeds?
How I scale my app?
Event-driven/ instant scale
Sub-second billing
Abstraction of
servers
What is Serverless?
Focus on Business
LogicReduced Time To Market
Reduced DevOps
Benefits of Serverless?
Application’s evolution
Ship.
Acct. Mang.
Hist.
Database
Client
Ship.
DB
Client
Hist.
DB
Mang.
DB
Acct.
DB
POST
GET
POST
UPDATE
Monolithic Microservices
Application’s evolution
Ship.
Acct. Mang.
Hist.
Database
Client
Monolithic
Ship.
DB
Client
Hist.
DB
Mang.
DB
Acct.
DB
POST
GET
POST
UPDATE
Microservices
Application’s evolution
Ship.
DB
Client
Hist.
DB
Mang.
DB
Acct.
DB
POST
GET
POST
UPDATE
Microservices
Application’s evolution
Client Mang.
DB
Microservices
POST Users
Users/Id
Users/Id
Users/Id
CreatUser
GetUser
UpdateUser
DeleteUser
GET
UPDATE
DELETE
Serverless
Azure FunctionsProcess events with Serverless code.
Make composing Cloud Apps insanely easyDevelop Functions in C#, Node.js, F#, Python, PHP, Batch and more Easily schedule event-driven tasks across servicesExpose Functions as HTTP API endpointsScale Functions based on customer demandEasily integrate with Logic Apps
Code Events + dataAzure Functions
Functions Hello WorldDemo
Functions Programming ModelTrigger(data) Input Input
code
Output
Output
• Function as a single unit of work• Functions are executed per trigger • Functions have inputs and outputs
Input
Triggers and
bindings
Functions Programming Model - Best Practices• Functions should “do one thing”• Functions should be stateless• Functions should be idempotent• Functions should finish as quickly as possible
1
Serverless Patterns
Every 15 minutes Clean tableFind and clean invalid data
ApplicationsExample: Timer based processing
File added toBlob Storage
Transform CSV to datarows Power BIChart graphic
ApplicationsExample: Azure service event processing
Photo taken andWebHook called Stores in blob storage Produces scaled images
Async background processingExample: Serverless Mobile back ends
Loaded web pagecallsWebHook
Completed pageCreate ad based on user profile
ApplicationsExample: Serverless Web Applications architectures
Millionsof devices feedinto Stream Analytics
Store data inSQL Online
Transform to structured data
ApplicationsExample: Real-time stream processing
Microsoft and ServerlessTry Functions – https://functions.azure.comTry App Service – https://tryappservice.azure.com