This talk was given during Talks 4 Nerds (T4N) on the 12.11.2018. The topic of the talk was OpenFaaS and also an use case showing the usage of OpenFaaS to redefining external API's.
2. Who am I ?
Simon Pelczer
Software Engineer @ LivePerson
OpenFaaS Contributor
Bachelor of Science (HS Mannheim)
Distributed Applications
Kubernetes / Docker
Github:Templum
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
3. Agenda
What is this FaaS thingy ?
What exactly is OpenFaaS ?
Difference between OpenFaaS & AWS Lambda
How does OpenFaaS work?
OpenFaaS in Action
Example Usecase: LivePerson FaaS
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
4. What is this FaaS thingy ?
Talks4Nerds
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
5. What is this
FaaS thingy ?
Hardware
Virtualization
OS
Runtime
Application
IaaS CaaS PaaS FaaS
Hardware
Virtualization
OS
Runtime
Application
Hardware
Virtualization
OS
Hardware
Virtualization
OS
Code
Code
Container
Runtime
Application
Code
Container
Runtime
Application
Functions
Container
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
6. FaaS in a
Nutshell
Function Trigger Stateless Scalable
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
8. OpenFaaS is …
A FaaS Framework that runs on
top of Docker Swarm or
Kubernetes
Founded by Alex Ellis (Started in
December 2016)
Written in Golang
Licensed under MIT
Configuration Code
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
13. Limitation /
Particularities
The amount of parallel running lambda instances is limited
Per Account
Per Zone
There are limits for code and environment variables
Max execution time is 5 minutes
It‘s not possible to debug the application locally in an environment
that matches the later production environment
For the invoking side, there is a difference between async / sync
Lambda when approaching the limit
Sync: Caller has to perform the retry and receives 429
Async:Amazon will perform retries up to 6 hours
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
14. Pricing Model
Based on Memory +
ComputationTime
CPU is indirectly based
on RAM := More RAM
=> More CPU
Hidden Cost of AWS Lambda
Source: https://medium.com/@amiram_26122/the-hidden-costs-of-serverless-6ced7844780b
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
17. Limitation /
Particularities
Auto Scaling works default based on the number of incoming
requests
You can replace the built-in autoscaling by native implemantation
Maintenance on Open FaaS has to be done manually including
protection
Out of the box in comes with basic auth
Root Filesystem for Functions is available but not the default
Using the HTTP basedWatchdog you can hold connection pools,
reducing the impact on your database
Supports both Kubernetes and Docker Swarm
It‘s possible to test the function locally in a similar environment
Existing Monitoring Setups can be reused
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
18. Pricing Model
On-Premise:
Costs are based on hardware costs (as expected)
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
29. What is the
problem?
Change Requests from customers rise faster then R&D can deliver
The process for an Enhancement Request is complicated and not
straight forward
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
30. What do we
want to
achieve?
Reduce the time to market for a customization
Reduce the complexity of enhancing the platform
Provide a platform which can also be used internally
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018
31. How do we
achieve it?
A (web-based) UI that allows the creation of functions for selected
events within Live Engage
Building & Deployment of functions powered by Docker &
OpenFaaS
Execution of functions on OpenFaaS
Isolated
Limited Ressources
Limited FS / User Privileges
Simon Pelczer | Software Engineer @ LivePerson 12.11.2018