Serverless is the new black
Go Serverless with
Azure AppServices, Queues and Functions
Raphaël Bickel
27.06.2017
www.7peakssoftware.com
Agenda
1. Introduction
2. Why the cloud ?
3. What is Serverless ?
4. Azure AppServices
5. Azure Queues
6. Azure Functions
7. Wrapping up
Introduction
Raphaël Bickel
8 years experience in software development and system architecture
.Net / Java / SharePoint / Windows servers
Amazon Web Services, Microsoft Azure Cloud
Crazy about: Performance, maintainability, scalability, continuous
integration, beer & pizza
Why the cloud ?
Flexility
Cost
Effort / Time
Security
Why the cloud ?
What is serveless (?)
• There is a server 
• Focus on Business
• Pay As You Go
• Time to market
AppServices
PaaS
AppServices: What does it solve ?
Infrastructure using VMs
VM
VM
VM
Load
balancer
VM
VM
VM
Load
balancer
SQL database
AppServices: How does it solve it?
Platform as a Service (PaaS)
Global scale with high availability
DevOps optimization
WebJobs
SQL databaseApp Service App Service
AppServices
Demo
Queues
Asynchronous Messaging Queuing
Queues: What does it solve ?
Database bottleneck
Transient data
Commands
SQL database
API App
Web App
Web App
SQL data sync
Queues : How does it solve it ?
64Kb message - UTF-8
7 days retention
Concurrent access
FIPFO
Storage queue
SQL database
(generic)
API App
Web App
Web App
WebJobs
Storage queue
Batch Server 1
Queues
Demo
Storage queueStorage (Azure)
Functions
PaaS extended
Azure Functions: Why ?
Idle time
Cost
Isolation (Single Responsibility
Principle)
Microservices vs Monolith application
Email App
SSO Webpage
Resize Image
API Shadow
Encrypt
Batch Server 1
Batch Server 2
SQL database
SQL data sync
Azure Functions: How ?
Azure Functions: What ?
Microservices
Instant scale
Millisecond billing
Bindings : http / queue / service bus /
blob / timers / on demand / Cosmos DB
Languages: C#, F#, Node.js, Python,
PHP, batch, bash, or any executable
Azure Functions
Demo
Azure Functions
Single purpose by nature
Stateless service
Execution must be brief
Minimize internal dependencies
Integration through bindings (in/out)
Pros / cons
Focus on business
Reduce Dev/Ops
Decouple apps
Async
Time to market
Cost
Short time running operations
Vendor lock-in
Cold start
Tooling
Additional overhead for function call
Conclusion
Thick clients / thin and stateless backend
Focus on Business
Embrace the cloud
Thank you
www.7peakssoftware.com
Next session: Azure AI with Machine Learning
https://bitbucket.org/raphael_7peaks/7peaksmeetupazureserveless

Serverless is the new black

Editor's Notes

  • #3 Me Nowadays we cannot avoid it anymore
  • #5 Flexibility: Doesn’t need to dedicate hardware resources to a specific Application/Service Can change easily allocated resources Cost: Cheaper no need hardware Can also have Dev/Ops team. Less people needed Effort/Time Env. up in seconds / minutes Security Patching Data Encryption
  • #6 Flexibility: Doesn’t need to dedicate hardware resources to a specific Application/Service Can change easily allocated resources Cost: Cheaper no need hardware Can also have Dev/Ops team. Less people needed Effort/Time Env. up in seconds / minutes Security Patching Data Encryption
  • #7 Server less is the next level of PaaS You don’t even need to think about the resources
  • #9 Setup VM Patch VM Setup LB LOOP on: Deploy app Create image Setup auto scaling Scaling:
  • #10 Platform as a service Don’t need to worry / take care of OS, patches, IIS, Framework updates, etc. Run on Windows Servers / IIS or Linux / Docker .Net, php, java, python DevOps optimization Set up continuous integration and deployment with Visual Studio Team Services, GitHub, or BitBucket. Promote updates through test and staging environments. Perform A/B testing. Manage your apps in - App Service by using Azure PowerShell or the cross-platform command-line interface (CLI). 0 downtime deployments with slots Global scale with high availability Scale up/out in seconds Deploy across regions WebJobs - Scheduled tasks / Manual tasks
  • #11 Create default .NetCore App Deploy to new / existing AppService Plan Show AppInsights
  • #13 Main Goal of WebApplications / WebSites : Serve all the requests Serve client quickly Why use queue: Offload database operations Process async operations Exemples: Send confirmation email Compress image
  • #14 Main Goal of WebApplications / WebSites : Serve all the requests Serve client quickly Why use queue: Offload database operations Process async operations Exemples: Send confirmation email Compress image FIPFO : First In Probably First Out Consumer read the message (hide it for 30seconds from other potential consummer. Consumer can delete the message, edit the message, or do nothing. Will be dequeued again after 30s Target throughput for single queue (1 KB messages)Up to 2000 messages per second
  • #15 Main Goal of WebApplications / WebSites : Serve all the requests Serve client quickly Why use queue: Offload database operations Process async operations Exemples: Send confirmation email Compress image FIPFO : First In Probably First Out Consumer read the message (hide it for 30seconds from other potential consummer. Consumer can delete the message, edit the message, or do nothing. Will be dequeued again after 30s
  • #18  - Warm-up ~4 seconds Scale-out when many events Low coupling Any exemple of Microservices
  • #19  - Warm-up ~4 seconds Scale-out when many events Low coupling Any exemple of Microservices
  • #20 Bindings exemples: https://github.com/Azure/azure-webjobs-sdk-samples/tree/master/BasicSamples
  • #21 Examples: Async usage: Mail service Analytics service Ads service File post-processing Sync usage: - TODO list Money transfer Fraud check Any microservices
  • #22 Focus on business: no overhead with VM / OS / Patching Reduce Dev/Ops : directly to code Decouple apps: Force to split into functions / micro-services Async: Process more asynchronous less synchronous. http://www.reactivemanifesto.org/ Time to market: Quicker software realease, also very compatible with agile where to focus on features Cost:lower operational and development costs Short time running operations: execution is limited to 5 minutes Vendor lock-in: increase couple with cloud vendor (however can use nodejs, python, …) Cold start: despite Microsoft works a lot on it, minimum cold start in 4s. Additional overhead for function calls: Need to integrate or app with more external services