BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
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
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
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
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
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