Serverless Architecture
in 10 minutes or less
Alexa, tell me about serverless architecture
Serverless Architecture:
What is it?
- Backend as a service (BaaS)
- Functions as a service (FaaS)
FaaS === a logical evolution of Platform as a Service (PaaS)
- PaaS: long running containers that provide ease of use & scalability
- PaaS examples: Heroku, BitNami, Google AppEngine, etc..
- FaaS examples: AWS Lambda (Amazon), Azure Functions (Microsoft), Cloud Functions (Google), OpenFaaS & Fn Project.
FaaS === ephemeral containers
transient stateless containers that scale
- Containers: Run your code in here, without worrying about hardware and OS.
- Transient: They're here, then *poof*, they're gone!
- Stateless: You need state? Put it in a database.
- Scale: don't worry about capacity, we'll scale it automatically to meet demand.
Is it right for me?
Maybe.
FaaS Pros:
- Cost effective
- Can scale automagically
- Deployments can be simple and straight-forward
- Removes a lot of (unnessecary?) overhead
- Great for microservices & event-driven apps
FaaS Cons:
- #NoOps is a lie
- The learning curve is steep
- Coldstarts can be a problem
- Not efficient for long running tasks
- Testing & running locally can be a challenge
- Vendor lock-in is real
If you remember anything:
- Call it FaaS
- It probably won't change your life
- It probably won't ruin your life
- It might be a good option