The use of serverless architecture has very quickly become an accepted approach for organizations deploying cloud applications, with a plethora of choices available for deployment.
Even traditionally conservative organizations are making partial use of some serverless technologies.
Most of the discussion goes to Functions as a Service (e.g., AWS Lambda, Google Cloud Functions, Azure Functions) while the appropriate patterns for use are still emerging.
2. FullStack Developers Israel
INTRO - WHO WE ARE
WHO WE ARE ?
▸ Tikal helps ISV’s in Israel & abroad in their technological
challenges.
▸ Our Engineers are Fullstack Developers with expertise in
Backend, DevOps, Frontend & Mobile
▸ We are passionate about technology and specialize in
OpenSource technologies.
▸ Our Tech and Group leaders help establish & enhance existing
software teams with innovative & creative thinking.
https://www.meetup.com/full-stack-developer-il/
3. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
INTRODUCTION
▸ What all this “talking” Functions, Lambda, Serverless …
▸ Clear the ‘musk’ about Lambda
▸ What is this serverless stuff again ?!
▸ Didn’t we loose that fight to Docker ?
▸ Abstract backend services …
▸ Serverless -> Who am I married too then ?!
3
5. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
CLEAR THE ‘MUSK’ ABOUT LAMBDA MISCONCEPTIONS
▸ Lambda is Amazon Web Services commercial name for it’s “event-driven,
serverless computing platform” another great way to sell “compute” (and calling it
serverless ;) )
▸ AWS Lambda is named after:
5
8. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
BASICALLY, A NEW MODEL CONSUMING COMPUTE RESOURCES … WITH A BIG +
Time Days Minuets Seconds Milliseconds
Cost
Agility
Scalability
https://www.slideshare.net/BryanMcAninch/the-faas-and-the-curious-86874211
8
9. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
FROM SERVERS TO SERVICES = SERVERLESS…
https://www.slideshare.net/BryanMcAninch/the-faas-and-the-curious-86874211
Days Minuets Seconds Milliseconds
9
10. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
TELL ME SOMETHING I DON’T KNOW !
▸ Time is money
▸ More for less!
▸ Pay as you go …
10
11. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
FUNCTIONS, FUNCTIONS, FUNCTIONS
▸ We’ve been doing them all along …
▸ So what’s all the (big) fuss about ?
11
15. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT IF ? WE TAKE AWAY THE HOST …
THE
APP
THE
APP
LOAD BALANCER
15
16. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT IF ? WE TAKE AWAY THE HOST … AND THE APP
LOAD BALANCER
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
16
17. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT IF ? WE TAKE AWAY THE HOST … AND THE APP
APPLICATION GATEWAY
[ BAAS ]
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
/{user} -> user function
/{pet} -> pets function
Common Backend Services such as
- Authentication
- Image rendering
- * Messaging
17
18. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SO, FUNCTIONS ARE JUST 1/2 OF THE STORY ….
▸ Authentication
▸ Authorization
▸ Databases
▸ Queues
▸ Messaging
▸ …
18
19. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT IF ? WE TAKE AWAY THE HOST … AND THE APP
APPLICATION GATEWAY
[ BAAS ]
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
/{user} -> user function
/{pet} -> pets function
Common Backend Services such as
- Authentication
- Image rendering
- * Messaging
19
20. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT IF ? WE TAKE AWAY THE HOST … AND THE APP
APPLICATION GATEWAY
[ BAAS ]
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
FUNCTION
/{user} -> user function
/{pet} -> pets function
Common Backend Services such as
- Authentication
- Image rendering
- * Messaging
20
21. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SO FAAS IS THE NEW MICRO-SERVICE !
THE
MONOLITH
> >
FUNCTION
FUNCTION
FUNCTION
21
22. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WAIT !, ISN’T “SERVERLESS” PAAS ?
▸ How does this differ from
▸ Heorku
▸ CloudFormation
▸ CloudFoundery …
▸ …
Let’s ask someone who knows a thing or 2 …
22
23. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SERVERLESS JUST MEANS “LESS” “SERVERS” …
IaaS Paas Severless SaaS
Application Application Application Application
Data Data Data Data
Runtime Runtime Runtime Runtime
Middleware Middleware Middleware Middleware
OS OS OS OS
Virtualization Virtualization Virtualization Virtualization
Servers Servers Servers Servers
Storage Storage Storage Storage
Network Network Network Network
You need to manage
You consume
24. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SERVERLESS PROS
▸ Capacity Management
▸ Pay Per use / As you go
▸ Auto Recovery / Auto healing
▸ Versioning
▸ Centralised Log & Monitoring
▸ A standardised way to:
▸ enforce process isolation
▸ Unify deployment
24
▸ Trigger more functions …
▸ Your billed by the second
▸ If one fails just spin another
▸ Functions are behind a url have /dev /prod /v1 /v2 …
▸ Process is logged / monitored by the “providers watchdog”
▸ A standardised way to:
▸ Every part of your app is isolated
▸ Even deployment either has an endpoint or not …
25. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SERVERLESS CONS
▸ Less control on Infra
▸ Vendor lock-in
▸ Learning curve
▸ Services have no state
▸ Vendor differences
▸ Cold Start for JVM’s
▸ Security
25
▸ That’s what you wanted ! Ins't it ?!
▸ Use Frameworks / Kubernetes / Combine …
▸ Like any new tool / framework
▸ Do not rely on API GW’s cache (more BaaS)
▸ Migration has a cost from 1 provider 2 another
▸ “Warming lambda’s” - link
▸ Use a common solution (which integrates with all)
26. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
WHAT CAN WE FUNCTIONIZE ?
▸ HINT - pretty much anything …
26
27. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
BUILD SIMPLE APPLICATIONS
▸ Create a full-stack serverless web-app with a single file
https://rea.tech/create-a-full-stack-serverless-web-app-with-a-single-file/
https://github.com/Kalimaha/serverless-guestbook
https://keiran.scot/2017/11/03/going-serverless-with-aws-serverless-user-authentication-part-1/
28. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
OR COMPLEX ONES …
https://read.acloud.guru/serverless-event-sourcing-at-nordstrom-ea69bd8fb7cc
▸ Step by Step
▸ Monolith to
Serverless
architecture for
“part”s of you
application
29. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
MANAGING IOT WITH SERVERLESS
▸ Designed to scale
▸ Scalable by design …
▸ Pay as you go …
30. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
BUILDING CHATBOTS WITH SERVERLESS AND AWS LAMBDA
https://chatbotsmagazine.com/a-serverless-event-driven-architecture-for-chatbots-3095eb40cbb7
31. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SERVERLESS -> WHO R WE MARRIED TO ?
▸ Choose from many F**S/B**S providers
▸ Or … Use Frameworks !
31
35. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
STREAM ALERT
https://medium.com/airbnb-engineering/streamalert-real-time-data-analysis-and-alerting-e8619e3e5043
▸ Airbnb’s serverless
framework.
▸ Scalable to TB’s/hour,
infrastructure deployment is
automated and it’s
▸ Secure by default.
38. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
SERVERLESS -> WHO R WE MARRIED TO ? - YOUR CHOICES !
▸ Choose from many F**S/B**S providers
▸ Or … Use Frameworks !
▸ Or Build your own …
▸ [ we didn’t say Kubernetes yet ;) ]
38
39. FullStack Developers Israel
WHATS ALL THE FAAS ABOUT ?
CHOICES … MORE CHOICES
▸ Use the cloud all the way
▸ Use the cloud via Framework
▸ Use the cloud via cloud Native
implementations
▸ Mix ’n’ Match …
41. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
UNDER THE HOOD
Provider’s Monitor
Provider’s Log
Your …
Provider’s Infra
Provider’s Base Images
41
42. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
DESIGN YOUR OWN CLOUD NATIVE SERVERLESS IMPLEMENTATION
42
43. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
OPENFAAS || FAAS NETES
▸ Use underlaying docker orchestration engines
such as Swarm or Kubernetes.
▸ Encapsulate functions into containers { just like
cloud providers do }
▸ Infrastructure scaling in<->out done via IaaS auto
scaling capabilities
43
45. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
OPENFAAS ARCHITECTURE
Request router
Monitor / Alerts
on Functions
“IaaS Provider”
Build & Execute
46. Tikal Knowledge
WHATS ALL THE FAAS ABOUT ?
FUNCTION AS A SERVICE WITH OPENFAAS ON BANZAI CLOUD PIPELINE
https://banzaicloud.com/blog/openfaas/
▸ Use Kubernetes.
▸ Encapsulate
functions into
containers
▸ Infrastructure
scaling in<->out
done via IaaS
auto scaling
capabilities