SlideShare a Scribd company logo
1 of 69
Download to read offline
Nome Speaker
@twitter
 Si fa presto a dire Serverless
Daniel Depaoli
@dedaniel_xp
Alessio Coser
@AlessioCoser
Si fa presto a dire Serverless
What we are going to talk about?
1. Introduction to Serverless
2. Our Dev Experience
3. Our Ops Experience
Si fa presto a dire Serverless
What is Serverless?
Si fa presto a dire Serverless
What is Serverless?
Si fa presto a dire Serverless
Function as a Service
Si fa presto a dire Serverless
What is a Function?
Custom code that’s run in an ephemeral context.
Si fa presto a dire Serverless
What is a Function?
Custom code that’s run in an ephemeral context.
● The code/application that we want to execute
● The Service we provide to our users
● Responds to events
Si fa presto a dire Serverless
What is a Function?
● Created only to run your code and then destroyed
● Has no state or persistence
● It’s still a server!
Custom code that’s run in an ephemeral context.
Si fa presto a dire Serverless
What is a Function?
Si fa presto a dire Serverless
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
IaaS
Customer Managed
Unit of scale
Customer Managed
Abstract by vendor
Si fa presto a dire Serverless
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
IaaS PaaS
Customer Managed
Unit of scale
Customer Managed
Abstract by vendor
Si fa presto a dire Serverless
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
Functions
Application
Runtime
Operating
System
Virtualization
Hardware
IaaS PaaS FaaS
Customer Managed
Unit of scale
Customer Managed
Abstract by vendor
● No infrastructure maintenance
● Built-in automatic scaling
● Only pay for the execution time
● No persistence, no state
● Limited execution time
● Fully integrated with cloud provider’s services
Si fa presto a dire Serverless
Main features
Si fa presto a dire Serverless
Cloud-Computing Providers
● Amazon AWS Lambda
● Google Cloud Functions
● Azure Functions
Si fa presto a dire Serverless
Runtimes
● NODE.JS
● JAVA
● PYTHON
● More
Nome Speaker
@twitter
 Our Dev experience
Si fa presto a dire Serverless
Our Dev experiences
aws.amazon.com/solutions/case-studies/photovogue
Our Dev experiences PhotoVogue
An online photography platform
● Allows upcoming photographers to showcase
their work.
● Each picture that’s submitted is carefully
reviewed by Vogue Italia’s editorial staff.
Our Dev experiences PhotoVogue
● ~ 400,000 photos
● ~ 130,000 photographers
● ~ 3,000 uploaded images each day
An online photography platform
Our Dev experiences PhotoVogue
Our Dev experiences PhotoVogue
● Application that scales
● No state or sessions
● No long running scripts
● Upload and resize of photos in parallel
How FaaS applies to the domain
Upload and resize feature
Our Dev experiences PhotoVogue
FaaS
EVENT
S3
UPLOAD
RESIZED IMAGES
AWS
Benefits
Our Dev experiences PhotoVogue
Zero downtime deployment
Our Dev experiences PhotoVogue
> 1 deploy per day
Our Dev experiences PhotoVogue
Autoscaling
Our Dev experiences PhotoVogue
Average of
~ 650 invocation/minute
Our Dev experiences PhotoVogue
Maximum peaks
> 1500 invocation/minute
Our Dev experiences PhotoVogue
(as long as an entire AWS region does not crash)
[image]
Our Dev experiences PhotoVogue
No downtime
Challenges
Our Dev experiences PhotoVogue
Vendor lock-in
Our Dev experiences PhotoVogue
Decouple business logic from the cloud platform
Our Dev experiences PhotoVogue
Use a Framework like Serverless
Our Dev experiences PhotoVogue
Dependencies
Our Dev experiences PhotoVogue
Very common problem:
You have two distinct functionalities, and
they share some of their code
Our Dev experiences PhotoVogue
1st solution:
Create a single function which responds
to two different events
Our Dev experiences PhotoVogue
Easy to update
No dependencies to manage
Big function
Violates Single Responsibility Principle
Our Dev experiences PhotoVogue
2nd solution:
Create two different functions with the
same code
Our Dev experiences PhotoVogue
Common parts are easier to share
No dependencies to manage
Deploy takes longer
Unnecessary dependencies are also shared
Must deploy each function to update common code
Our Dev experiences PhotoVogue
3rd solution:
Create two different functions with an
external shared dependency (es: git, npm)
Our Dev experiences PhotoVogue
No duplicated code
Can use different versions of dependency
Startup time increases
You have to manage an external library
Our Dev experiences PhotoVogue
4th solution:
Create two different functions that will
invoke a third one (containing the shared
behaviour)
Our Dev experiences PhotoVogue
No duplicated code
Can use different versions of common function
Execution time increases
Additional point of failure
Our Dev experiences PhotoVogue
There isn’t a perfect solution
Our Dev experiences PhotoVogue
Nome Speaker
@twitter
 Our Ops experiences
Si fa presto a dire Serverless
Our Ops experiences
 Disaster Recovery and Testing
A Disaster Recovery implementation
Our Ops experiences Disaster Recovery and Testing
Our Ops experiences Disaster Recovery and Testing
AWS does not provide a DR solution
1. Backup
a. Every night create VMs snapshot
b. Move snapshots to another AWS region
Our Ops experiences Disaster Recovery and Testing
Our implementation with FaaS
2. Recovery
a. Activate the new environment in alternative region with
lastest snapshots
3. Test
a. Check services and send notification
Our Ops experiences Disaster Recovery and Testing
Our implementation with FaaS
Our Ops experiences
 Interaction with infrastructure
Sometimes we need to schedule a task
Our Ops experiences Interaction with infrastructure
Our Ops experiences Interaction with infrastructure
Load
Balancer
Instance InstanceInstance task
Master
● Lambda direct SSH connection to instance
● Triggering or doing particular tasks
● Check Backup S3
● Dump DB
● Clean EFS
● Etc.
Our Ops experiences Interaction with infrastructure
Some example:
Our Ops experiences
 Operations and monitoring
Simulating user browsing session
Our Ops experiences Monitoring
Our Ops experiences Monitoring
Integration with versioning system hosting service
Our Ops experiences CI/CD
Benefits
Our Ops experiences Monitoring
No third party tools
Our Ops experiences
No instances for just one task
Our Ops experiences
Our Ops experiences
Trigger one shot action
Fully integrated with other AWS services
Our Ops experiences
Conclusions
FaaS - when?
Conclusions
● You need to simplify operational tasks
● Your app needs to scale
● Your domain logic is event based
● You need to process a large quantity of
data
● You want some form of control over the
infrastructure
● You have to maintain some state into the app
● Your functions take a long time to run
FaaS - when not?
Conclusions
Nome Speaker
@twitter
 Thanks!
PS: We are hiring -> www.xpeppers.com/carriere
Nome Speaker
@twitter
 Questions?
PS: We are hiring -> www.xpeppers.com/carriere
www.xpeppers.com
/xpepperssrl@xpeppers

More Related Content

What's hot

Building software by feature with immutable infrastructures on AWS
Building software by feature with immutable infrastructures on AWSBuilding software by feature with immutable infrastructures on AWS
Building software by feature with immutable infrastructures on AWSNicolas Mas
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory TestingJustin Ison
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaAmazon Web Services
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at NetflixGareth Bowles
 
Developer day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsDeveloper day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsMatthew Cwalinski
 
LONDON SDET MEETUP - Difference between Selenium and Cypress presentation
LONDON SDET MEETUP - Difference between Selenium and Cypress presentationLONDON SDET MEETUP - Difference between Selenium and Cypress presentation
LONDON SDET MEETUP - Difference between Selenium and Cypress presentationSriram Angajala
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With CypressKnoldus Inc.
 
SeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoSeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoAndrii Soldatenko
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applicationsAndrii Soldatenko
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressErez Cohen
 
Performance Monitoring with AOP and Amazon CloudWatch
Performance Monitoring with AOP and Amazon CloudWatchPerformance Monitoring with AOP and Amazon CloudWatch
Performance Monitoring with AOP and Amazon CloudWatchYan Cui
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Hong Tat Yew
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingJesse Gallagher
 
Keep your projects up-to-date
Keep your projects up-to-dateKeep your projects up-to-date
Keep your projects up-to-dateKelly Selden
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseJesse Gallagher
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and MonitoringMelissa Benua
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressionsHans Emmel
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best PracticesSauce Labs
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSauce Labs
 

What's hot (20)

Building software by feature with immutable infrastructures on AWS
Building software by feature with immutable infrastructures on AWSBuilding software by feature with immutable infrastructures on AWS
Building software by feature with immutable infrastructures on AWS
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
 
Developer day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast DeploymentsDeveloper day - AWS: Fast Environments = Fast Deployments
Developer day - AWS: Fast Environments = Fast Deployments
 
LONDON SDET MEETUP - Difference between Selenium and Cypress presentation
LONDON SDET MEETUP - Difference between Selenium and Cypress presentationLONDON SDET MEETUP - Difference between Selenium and Cypress presentation
LONDON SDET MEETUP - Difference between Selenium and Cypress presentation
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
SeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii SoldatenkoSeleniumCamp 2015 Andrii Soldatenko
SeleniumCamp 2015 Andrii Soldatenko
 
Building serverless-applications
Building serverless-applicationsBuilding serverless-applications
Building serverless-applications
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With Cypress
 
Performance Monitoring with AOP and Amazon CloudWatch
Performance Monitoring with AOP and Amazon CloudWatchPerformance Monitoring with AOP and Amazon CloudWatch
Performance Monitoring with AOP and Amazon CloudWatch
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
CollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP ToolingCollabSphere 2020 - NSF ODP Tooling
CollabSphere 2020 - NSF ODP Tooling
 
Keep your projects up-to-date
Keep your projects up-to-dateKeep your projects up-to-date
Keep your projects up-to-date
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - Jesse
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
 
Cypress first impressions
Cypress first impressionsCypress first impressions
Cypress first impressions
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best Practices
 
Selenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce LabsSelenium and Appium Training from Sauce Labs
Selenium and Appium Training from Sauce Labs
 

Viewers also liked

Hiring Great People: how we improved our recruiting process to build and grow...
Hiring Great People: how we improved our recruiting process to build and grow...Hiring Great People: how we improved our recruiting process to build and grow...
Hiring Great People: how we improved our recruiting process to build and grow...Pietro Di Bello
 
BLUG Presentation - sysdig - Feb 2017
BLUG Presentation - sysdig - Feb 2017BLUG Presentation - sysdig - Feb 2017
BLUG Presentation - sysdig - Feb 2017Dan Mackin
 
Metriche per finanziare il cambiamento
Metriche per finanziare il cambiamentoMetriche per finanziare il cambiamento
Metriche per finanziare il cambiamentoXPeppers
 
Articles 260525 modelo-crecer
Articles 260525 modelo-crecerArticles 260525 modelo-crecer
Articles 260525 modelo-crecerjorgeedu7
 
Whichtheoriescaniapplytomymusic 170131122644-170203132252
Whichtheoriescaniapplytomymusic 170131122644-170203132252Whichtheoriescaniapplytomymusic 170131122644-170203132252
Whichtheoriescaniapplytomymusic 170131122644-170203132252Jshepherd1460
 
Apresentação Nova D9 Clube nova marco 2017 equipe Associação Unitel
Apresentação Nova  D9 Clube nova marco 2017 equipe Associação UnitelApresentação Nova  D9 Clube nova marco 2017 equipe Associação Unitel
Apresentação Nova D9 Clube nova marco 2017 equipe Associação UnitelNilton Lucas Associação Unitel
 
31 Best Growth Hacking Resources
31 Best Growth Hacking Resources31 Best Growth Hacking Resources
31 Best Growth Hacking ResourcesStephen Jeske
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiYukiya Nakagawa
 
AWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべことAWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべことKeisuke Nishitani
 
B2B Marketing and The Power of Twitter
B2B Marketing and The Power of TwitterB2B Marketing and The Power of Twitter
B2B Marketing and The Power of TwitterSteve Yanor
 
Secrets to a Great Team
Secrets to a Great TeamSecrets to a Great Team
Secrets to a Great TeamElodie A.
 
Class 1: Email Marketing Certification course: Email Marketing and Your Business
Class 1: Email Marketing Certification course: Email Marketing and Your BusinessClass 1: Email Marketing Certification course: Email Marketing and Your Business
Class 1: Email Marketing Certification course: Email Marketing and Your BusinessHubSpot
 
HubSpot Diversity Data 2016
HubSpot Diversity Data 2016HubSpot Diversity Data 2016
HubSpot Diversity Data 2016HubSpot
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Antonio Pérez Esclarín - Jesús, maestro y pedagogo
Antonio Pérez Esclarín - Jesús, maestro y pedagogoAntonio Pérez Esclarín - Jesús, maestro y pedagogo
Antonio Pérez Esclarín - Jesús, maestro y pedagogoMatias Rodriguez
 

Viewers also liked (20)

Hiring Great People: how we improved our recruiting process to build and grow...
Hiring Great People: how we improved our recruiting process to build and grow...Hiring Great People: how we improved our recruiting process to build and grow...
Hiring Great People: how we improved our recruiting process to build and grow...
 
BLUG Presentation - sysdig - Feb 2017
BLUG Presentation - sysdig - Feb 2017BLUG Presentation - sysdig - Feb 2017
BLUG Presentation - sysdig - Feb 2017
 
Metriche per finanziare il cambiamento
Metriche per finanziare il cambiamentoMetriche per finanziare il cambiamento
Metriche per finanziare il cambiamento
 
Articles 260525 modelo-crecer
Articles 260525 modelo-crecerArticles 260525 modelo-crecer
Articles 260525 modelo-crecer
 
Whichtheoriescaniapplytomymusic 170131122644-170203132252
Whichtheoriescaniapplytomymusic 170131122644-170203132252Whichtheoriescaniapplytomymusic 170131122644-170203132252
Whichtheoriescaniapplytomymusic 170131122644-170203132252
 
Presentación1
Presentación1Presentación1
Presentación1
 
Apresentação Nova D9 Clube nova marco 2017 equipe Associação Unitel
Apresentação Nova  D9 Clube nova marco 2017 equipe Associação UnitelApresentação Nova  D9 Clube nova marco 2017 equipe Associação Unitel
Apresentação Nova D9 Clube nova marco 2017 equipe Associação Unitel
 
31 Best Growth Hacking Resources
31 Best Growth Hacking Resources31 Best Growth Hacking Resources
31 Best Growth Hacking Resources
 
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigiReact Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
React Nativeはクロスプラットフォームモバイルアプリ開発の夢を見るか #DroidKaigi
 
AWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべことAWSでアプリ開発するなら 知っておくべこと
AWSでアプリ開発するなら 知っておくべこと
 
B2B Marketing and The Power of Twitter
B2B Marketing and The Power of TwitterB2B Marketing and The Power of Twitter
B2B Marketing and The Power of Twitter
 
Secrets to a Great Team
Secrets to a Great TeamSecrets to a Great Team
Secrets to a Great Team
 
Class 1: Email Marketing Certification course: Email Marketing and Your Business
Class 1: Email Marketing Certification course: Email Marketing and Your BusinessClass 1: Email Marketing Certification course: Email Marketing and Your Business
Class 1: Email Marketing Certification course: Email Marketing and Your Business
 
HubSpot Diversity Data 2016
HubSpot Diversity Data 2016HubSpot Diversity Data 2016
HubSpot Diversity Data 2016
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Mano amiga ong final
Mano amiga ong finalMano amiga ong final
Mano amiga ong final
 
Solar Window
Solar WindowSolar Window
Solar Window
 
Antonio Pérez Esclarín - Jesús, maestro y pedagogo
Antonio Pérez Esclarín - Jesús, maestro y pedagogoAntonio Pérez Esclarín - Jesús, maestro y pedagogo
Antonio Pérez Esclarín - Jesús, maestro y pedagogo
 
Scada
ScadaScada
Scada
 
Coronery artery disease
Coronery artery diseaseCoronery artery disease
Coronery artery disease
 

Similar to Si fa presto a dire serverless

End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...Paul Jensen
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleArnaud LEMAIRE
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupChase Douglas
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker, Inc.
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automationVishal Banthia
 
Angular Intermediate
Angular IntermediateAngular Intermediate
Angular IntermediateLinkMe Srl
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerPaul Jensen
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...ConSol Consulting & Solutions Software GmbH
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...ConSol Consulting & Solutions Software GmbH
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsAndrew Maxwell
 
JUST EAT: Embracing DevOps
JUST EAT: Embracing DevOpsJUST EAT: Embracing DevOps
JUST EAT: Embracing DevOpsPeter Mounce
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 

Similar to Si fa presto a dire serverless (20)

Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User GroupIs Serverless The New Swiss Cheese? - AWS Seattle User Group
Is Serverless The New Swiss Cheese? - AWS Seattle User Group
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBM
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
Angular Intermediate
Angular IntermediateAngular Intermediate
Angular Intermediate
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
 
Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
JUST EAT: Embracing DevOps
JUST EAT: Embracing DevOpsJUST EAT: Embracing DevOps
JUST EAT: Embracing DevOps
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 

Recently uploaded (20)

Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 

Si fa presto a dire serverless

  • 1. Nome Speaker @twitter Si fa presto a dire Serverless Daniel Depaoli @dedaniel_xp Alessio Coser @AlessioCoser
  • 2. Si fa presto a dire Serverless What we are going to talk about? 1. Introduction to Serverless 2. Our Dev Experience 3. Our Ops Experience
  • 3. Si fa presto a dire Serverless What is Serverless?
  • 4. Si fa presto a dire Serverless What is Serverless?
  • 5. Si fa presto a dire Serverless Function as a Service
  • 6. Si fa presto a dire Serverless What is a Function? Custom code that’s run in an ephemeral context.
  • 7. Si fa presto a dire Serverless What is a Function? Custom code that’s run in an ephemeral context. ● The code/application that we want to execute ● The Service we provide to our users ● Responds to events
  • 8. Si fa presto a dire Serverless What is a Function? ● Created only to run your code and then destroyed ● Has no state or persistence ● It’s still a server! Custom code that’s run in an ephemeral context.
  • 9. Si fa presto a dire Serverless What is a Function?
  • 10. Si fa presto a dire Serverless Functions Application Runtime Operating System Virtualization Hardware IaaS Customer Managed Unit of scale Customer Managed Abstract by vendor
  • 11. Si fa presto a dire Serverless Functions Application Runtime Operating System Virtualization Hardware Functions Application Runtime Operating System Virtualization Hardware IaaS PaaS Customer Managed Unit of scale Customer Managed Abstract by vendor
  • 12. Si fa presto a dire Serverless Functions Application Runtime Operating System Virtualization Hardware Functions Application Runtime Operating System Virtualization Hardware Functions Application Runtime Operating System Virtualization Hardware IaaS PaaS FaaS Customer Managed Unit of scale Customer Managed Abstract by vendor
  • 13. ● No infrastructure maintenance ● Built-in automatic scaling ● Only pay for the execution time ● No persistence, no state ● Limited execution time ● Fully integrated with cloud provider’s services Si fa presto a dire Serverless Main features
  • 14. Si fa presto a dire Serverless Cloud-Computing Providers ● Amazon AWS Lambda ● Google Cloud Functions ● Azure Functions
  • 15. Si fa presto a dire Serverless Runtimes ● NODE.JS ● JAVA ● PYTHON ● More
  • 16. Nome Speaker @twitter Our Dev experience Si fa presto a dire Serverless
  • 18. Our Dev experiences PhotoVogue
  • 19. An online photography platform ● Allows upcoming photographers to showcase their work. ● Each picture that’s submitted is carefully reviewed by Vogue Italia’s editorial staff. Our Dev experiences PhotoVogue
  • 20. ● ~ 400,000 photos ● ~ 130,000 photographers ● ~ 3,000 uploaded images each day An online photography platform Our Dev experiences PhotoVogue
  • 21. Our Dev experiences PhotoVogue ● Application that scales ● No state or sessions ● No long running scripts ● Upload and resize of photos in parallel How FaaS applies to the domain
  • 22. Upload and resize feature Our Dev experiences PhotoVogue FaaS EVENT S3 UPLOAD RESIZED IMAGES AWS
  • 24. Zero downtime deployment Our Dev experiences PhotoVogue
  • 25. > 1 deploy per day Our Dev experiences PhotoVogue
  • 27. Average of ~ 650 invocation/minute Our Dev experiences PhotoVogue
  • 28. Maximum peaks > 1500 invocation/minute Our Dev experiences PhotoVogue
  • 29. (as long as an entire AWS region does not crash) [image] Our Dev experiences PhotoVogue No downtime
  • 31. Vendor lock-in Our Dev experiences PhotoVogue
  • 32. Decouple business logic from the cloud platform Our Dev experiences PhotoVogue
  • 33. Use a Framework like Serverless Our Dev experiences PhotoVogue
  • 35. Very common problem: You have two distinct functionalities, and they share some of their code Our Dev experiences PhotoVogue
  • 36. 1st solution: Create a single function which responds to two different events Our Dev experiences PhotoVogue
  • 37. Easy to update No dependencies to manage Big function Violates Single Responsibility Principle Our Dev experiences PhotoVogue
  • 38. 2nd solution: Create two different functions with the same code Our Dev experiences PhotoVogue
  • 39. Common parts are easier to share No dependencies to manage Deploy takes longer Unnecessary dependencies are also shared Must deploy each function to update common code Our Dev experiences PhotoVogue
  • 40. 3rd solution: Create two different functions with an external shared dependency (es: git, npm) Our Dev experiences PhotoVogue
  • 41. No duplicated code Can use different versions of dependency Startup time increases You have to manage an external library Our Dev experiences PhotoVogue
  • 42. 4th solution: Create two different functions that will invoke a third one (containing the shared behaviour) Our Dev experiences PhotoVogue
  • 43. No duplicated code Can use different versions of common function Execution time increases Additional point of failure Our Dev experiences PhotoVogue
  • 44. There isn’t a perfect solution Our Dev experiences PhotoVogue
  • 45. Nome Speaker @twitter Our Ops experiences Si fa presto a dire Serverless
  • 46. Our Ops experiences Disaster Recovery and Testing
  • 47. A Disaster Recovery implementation Our Ops experiences Disaster Recovery and Testing
  • 48. Our Ops experiences Disaster Recovery and Testing AWS does not provide a DR solution
  • 49. 1. Backup a. Every night create VMs snapshot b. Move snapshots to another AWS region Our Ops experiences Disaster Recovery and Testing Our implementation with FaaS
  • 50. 2. Recovery a. Activate the new environment in alternative region with lastest snapshots 3. Test a. Check services and send notification Our Ops experiences Disaster Recovery and Testing Our implementation with FaaS
  • 51. Our Ops experiences Interaction with infrastructure
  • 52. Sometimes we need to schedule a task Our Ops experiences Interaction with infrastructure
  • 53. Our Ops experiences Interaction with infrastructure Load Balancer Instance InstanceInstance task Master ● Lambda direct SSH connection to instance ● Triggering or doing particular tasks
  • 54. ● Check Backup S3 ● Dump DB ● Clean EFS ● Etc. Our Ops experiences Interaction with infrastructure Some example:
  • 55. Our Ops experiences Operations and monitoring
  • 56. Simulating user browsing session Our Ops experiences Monitoring
  • 57. Our Ops experiences Monitoring
  • 58. Integration with versioning system hosting service Our Ops experiences CI/CD
  • 60. No third party tools Our Ops experiences
  • 61. No instances for just one task Our Ops experiences
  • 62. Our Ops experiences Trigger one shot action
  • 63. Fully integrated with other AWS services Our Ops experiences
  • 65. FaaS - when? Conclusions ● You need to simplify operational tasks ● Your app needs to scale ● Your domain logic is event based ● You need to process a large quantity of data
  • 66. ● You want some form of control over the infrastructure ● You have to maintain some state into the app ● Your functions take a long time to run FaaS - when not? Conclusions
  • 67. Nome Speaker @twitter Thanks! PS: We are hiring -> www.xpeppers.com/carriere
  • 68. Nome Speaker @twitter Questions? PS: We are hiring -> www.xpeppers.com/carriere

Editor's Notes

  1. Ultimamente si sente molto parlare di Serverless, ma secondo noi è un termine ambiguo che non lega molto con quello che in realtà si vuole comunicare perché ha assunto diversi significati. Serverless, come lo intendiamo noi non significa che non esistono server e tutto il codice viene eseguito come per magia. Si intende invece la possibilità di non dover gestire l’intera infrastruttura, perchè lo farà la piattaforma a cui ci appoggiamo. Per cui ci troviamo più a nostro agio a parlare di un’architettura Function as a Service (FaaS). Abbiamo quindi provato a dare una definizione il più semplice possibile.
  2. Ultimamente si sente molto parlare di Serverless, ma secondo noi è un termine ambiguo che non lega molto con quello che in realtà si vuole comunicare perché ha assunto diversi significati. Serverless, come lo intendiamo noi non significa che non esistono server e tutto il codice viene eseguito come per magia. Si intende invece la possibilità di non dover gestire l’intera infrastruttura, perchè lo farà la piattaforma a cui ci appoggiamo. Per cui ci troviamo più a nostro agio a parlare di un’architettura Function as a Service (FaaS). Abbiamo quindi provato a dare una definizione il più semplice possibile.
  3. Ultimamente si sente molto parlare di Serverless, ma secondo noi è un termine ambiguo che non lega molto con quello che in realtà si vuole comunicare perché ha assunto diversi significati. Serverless, come lo intendiamo noi non significa che non esistono server e tutto il codice viene eseguito come per magia. Si intende invece la possibilità di non dover gestire l’intera infrastruttura, perchè lo farà la piattaforma a cui ci appoggiamo. Per cui ci troviamo più a nostro agio a parlare di un’architettura Function as a Service (FaaS). Abbiamo quindi provato a dare una definizione il più semplice possibile.
  4. Ultimamente si sente molto parlare di Serverless, ma secondo noi è un termine ambiguo che non lega molto con quello che in realtà si vuole comunicare perché ha assunto diversi significati. Serverless, come lo intendiamo noi non significa che non esistono server e tutto il codice viene eseguito come per magia. Si intende invece la possibilità di non dover gestire l’intera infrastruttura, perchè lo farà la piattaforma a cui ci appoggiamo. Per cui ci troviamo più a nostro agio a parlare di un’architettura Function as a Service (FaaS). Abbiamo quindi provato a dare una definizione il più semplice possibile.
  5. Custom code è il codice applicativo che vogliamo eseguire, è il servizio che vogliamo erogare agli utenti, ai clienti. Il nostro codice viene eseguito a seguito di un evento specifico scatenato sulla piattaforma, ad esempio AWS ha molti eventi configurabili tra cui un evento S3, DynamoDB, SNS, CloudWatch eccetera...
  6. Custom code è il codice applicativo che vogliamo eseguire, è il servizio che vogliamo erogare agli utenti, ai clienti. Il nostro codice viene eseguito a seguito di un evento specifico scatenato sulla piattaforma, ad esempio AWS ha molti eventi configurabili tra cui API Gateway, S3 eccetera...
  7. Codice che viene eseguito in un contesto effimero. E’ un contesto di esecuzione che dura poco tempo, possiamo dire che viene creato per eseguire il nostro codice e, una volta completata l’esecuzione, viene distrutto. Di conseguenza non è possibile avere stato o persistenza all’interno del nostro codice, come la gestione di sessioni eccetera. Viene comunque eseguito all’interno di un server del nostro cloud provider.
  8. Quindi per evitare fraintendimenti a noi piace chiamarlo Function as a Service.
  9. !!! NB: Alcuni di questi valgono solo per AWS Lambda !!!! _________________________________________ cambiare i punti relativi solo ad AWS (limite in futuro può essere ritoccato) Modello di pagamento?? (verificare google cloud e azure)
  10. Iniziamo con un caso in cui abbiamo applicato un’architettura FaaS ...
  11. Abbiamo sviluppato le API backend di questa piattaforma online di fotografia in cui gli aspiranti fotografi posso mostrare il loro lavoro. Ogni foto caricata viene verificata dallo staff di Vogue Italia che eventualmente ne permette la pubblicazione sulla piattaforma.
  12. Abbiamo sviluppato le API backend di questa piattaforma online di fotografia in cui gli aspiranti fotografi posso mostrare il loro lavoro. Ogni foto caricata viene verificata dallo staff di Vogue Italia che eventualmente ne permette la pubblicazione sulla piattaforma.
  13. Questa piattaforma attualmente permette la gestione di circa 400.000 foto da parte di oltre 130.000 fotografi. Lo staff di Vogue Italia deve verificare ogni giorno circa 3.000 immagini.
  14. L’applicazione ha bisogno di scalare molto e spesso perché deve riuscire a sopportare intensi picchi di richieste in diverse fasce orarie. Il servizio di caricamento è aperto solamente alcuni giorni a settimana. State - sessions on possiamo essere sicuri di salvare qualcosa nella nostra funzione e ritrovarlo alla chiamata successiva, quindi per queste funzionalità ci appoggiamo ai servizi del cloud provider oppure a servizi esterni. Non abbiamo bisogno di gestire processi o applicazioni di lunga durata quindi ci basta il limite di 5 minuti imposto da AWS. Applicazione web deve essere veloce. Alcune funzionalità devono rispondere ad un evento specifico ed effettuare varie operazioni. Prendiamo come esempio l’upload dei file da parte dei fotografi.
  15. Questo è un esempio di come funziona la gestione degli upload di foto all’interno della nostra applicazione. Un fotografo fa un upload di una fotografia sullo Storage System nel nostro caso S3. Una volta completato l’upload, S3 scatena un evento che invoca le nostre Funzioni. In questo caso specifico le nostre funzioni si occupano di validare il formato ed eventualmente, ridimensionare in diverse dimensioni la fotografia e salva i suoi riferimenti in un database associandola all’utente. La funzione vive solo per il tempo di ridimensionamento dell’immagine. Questo ci permette un notevole risparmio sia di risorse che di tempo perché queste azioni vengono scalate orizzontalmente in modo naturale dall’architettura FaaS eseguendo i processi di ridimensionamento della foto in parallelo.
  16. Durante lo sviluppo abbiamo trovato sia dei benefici che delle sfide da affrontare nell’adozione di questa soluzione.
  17. Non abbiamo downtime durante il deploy. Per descrivere bene questo vantaggio è necessario capire come funziona il processo di deploy delle funzioni su AWS. Ogni funzione viene deployata singolarmente, ed è un semplice upload. Insieme al codice della funzione vengono impacchettate tutte le dipendenze richieste. Il pacchetto, poi, viene caricato sul cloud provider che si occupa di rendere disponibile la funzione all’interno dell’infrastruttura. In AWS ogni upload crea una nuova versione della funzione, in questo modo è possibile taggare le varie versioni con ad esempio “PRODUCTION”, “STAGING”, per poter utilizzare una versione specifica per ogni ambiente. -- sistemare -- Carichi funzione mentre la carichi non è pubblicata, come atto finale vai a taggare la versione con un etichetta in modo da rendere disponibile la funzione tramite un’etichetta specifica. (questo garantisce lo zero downtime) facile tornare indietro
  18. Con FaaS siamo consapevoli di aggiornare una singola funzionalità senza intaccare altre parti dell’applicazione, di conseguenza siamo riusciti ad incrementare il numero di deploy effettuati al mese, questo ci ha permesso di avere feedback più rapidi sulle nuove funzionalità.
  19. In base alle richieste il cloud provider gestisce autonomamente l’eventuale creazione di nuovi container in maniera totalmente trasparente. Quindi potrebbe scalare orizzontalmente qualora ce ne fosse la necessità duplicando la singola funzione in un nuovo container. ---
  20. Le sfide più importanti che abbiamo dovuto affrontare
  21. codice agnostico dal contesto in cui viene eseguito (es: aws invece che google cloud) Cerchiamo di diminuire il vendor lockin ma siamo consapevoli che rimane comunque abbastanza forte.
  22. Il codice dovrebbe essere agnostico dal contesto in cui viene eseguito (es: aws invece che google cloud) Quindi abbiamo cercato di astrarre il codice che dipende dai servizi del cloud provider disaccoppiando la logica di business dalla piattaforma. In questo modo se si dovesse sostituire un servizio o passare ad un altro provider si dovrebbero riscrivere solo gli adattori verso il nuovo cloud provider.
  23. Abbiamo utilizzato il framework Serverless che con le ultime versioni è compatibile anche con Azure Functions. HELPS IN DRIVING YOUR DEVELOPMENT ON A CLEAR PATH, HIDING ALL THE WORK NEEDED TO CONFIGURE, WIRE AND UPLOAD A LAMBDA TO AWS RUN/TEST AWS LAMBDA FUNCTIONS LOCALLY, OR REMOTELY AUTO-DEPLOYS, VERSIONS & ALIASES LAMBDA FUNCTIONS AND API ENDPOINTS INTERACTIVE CLI DASHBOARD TO EASILY SELECT AND DEPLOY FUNCTIONS AND ENDPOINTS
  24. PRO Facile aggiornarle in un colpo solo Non è necessario gestire dipendenze CONS: Rendi la funzione più grossa Viola il principio di singola responsabilità (Rischi di rompere una funzionalità toccandone un’altra)
  25. PRO Facile aggiornarle in un colpo solo Non è necessario gestire dipendenze CONS: Rendi la funzione più grossa Viola il principio di singola responsabilità (Rischi di rompere una funzionalità toccandone un’altra)
  26. PRO Facile condividere delle parti dell’applicazione Non è necessario gestire dipendenze CONS: Aumenta il tempo di deploy Se una delle due ha delle dipendenze grosse, queste vengono caricate inutilmente anche sull’altra Devi gestire il possibile disallineamento del codice delle diverse funzioni a meno che ad ogni modifica non fai il deploy di tutte le functions.
  27. PRO Facile condividere delle parti dell’applicazione Non è necessario gestire dipendenze CONS: Aumenta il tempo di deploy Se una delle due ha delle dipendenze grosse, queste vengono caricate inutilmente anche sull’altra Devi gestire il possibile disallineamento del codice delle diverse funzioni a meno che ad ogni modifica non fai il deploy di tutte le functions.
  28. PRO: Zero duplicazione del codice La dipendenza è esterna ed è possibile gestirla semplicemente con le sue versioni CONS: Aumenta il tempo di startup del container E’ necessario gestire esternamente una libreria
  29. PRO: Zero duplicazione del codice La dipendenza è esterna ed è possibile gestirla semplicemente con le sue versioni CONS: Aumenta il tempo di startup del container E’ necessario gestire esternamente una libreria
  30. PRO: Non hai duplicazione, non hai dipendenze da codice condiviso Possibile gestire le versione della lambda(dipendenza) utilizzando i tag in fase di deploy ed esplicitando la versione desiderata. CONS: Aumenta il tempo di esecuzione a causa della chiamata ad una differente funzione Un point of failure aggiuntivo rende più difficile capire esattamente dove si trova il problema (e comunicare se c’è un fallimento) Se le chiamate sono sincrone si raddoppia il costo di esecuzione(risolvere facendo chiamate asincrone con utilizzando per esempio delle code)
  31. PRO: Non hai duplicazione, non hai dipendenze da codice condiviso Possibile gestire le versione della lambda(dipendenza) utilizzando i tag in fase di deploy ed esplicitando la versione desiderata. CONS: Aumenta il tempo di esecuzione a causa della chiamata ad una differente funzione Un point of failure aggiuntivo rende più difficile capire esattamente dove si trova il problema (e comunicare se c’è un fallimento) Se le chiamate sono sincrone si raddoppia il costo di esecuzione(risolvere facendo chiamate asincrone con utilizzando per esempio delle code)
  32. Bisogna tenere conto di cosa è più importante per te (performance, qualità, point of failure).
  33. cosa è il disaster recovery: In caso un datacenter/region/multidatacenter falliscano, si garantisce la continuità del servizio
  34. Sempre acceso, sempre spento?
  35. Sempre acceso, sempre spento?
  36. Risparmio su piu fronti No 3 party NO instance