Serverless
(OBJ 3.1)
What is Serverless?
- Serverless computing doesn't mean no servers; it shifts server management away from developers
- Model where the responsibility of managing servers, databases, and some application logic is shifted away from developers
- Allows developers to focus solely on their application
- Relies on cloud service providers to handle server management, databases, and some application logic
- Functions as a Service (FaaS) Model
- Developers write and deploy individual functions triggered by events and run only when needed.
- Traditionally applications ran on a server regardless of demand
- Example:
- AWS Lambda
- Run code without provisioning or managing servers
- Simply upload code
- It will run and scale the execution to meet the application demand.
- Google Cloud Functions
- Write functions attached to events emitted from cloud services.
- AWS Lambda
Benefits of Serverless
- Reduced operational costs
- Pay only for compute time used, no charges when code is idle
- Substantial cost savings
- Automatic scaling
- Cloud provider scales resources based on workload, ensuring optimal capacity
- Applications are always at the right capacity
- Focus on core product
- Developers can concentrate on application functionality, not server management
- Can reduce time to market for new applications
- Faster time to market
- Reduced infrastructure concerns speed up application development
Challenges and Risks
- Vendor Lock-in
- Reliance on proprietary interfaces limits flexibility and may increase costs
- Makes it challenging to change providers or use multiple providers
- Immaturity of best practices
- Serverless is a relatively new field, and best practices are still evolving
- There are unique considerations that must be taken into account
Not a one-size-fits-all solution
- Consider the specific needs and requirements of your application; serverless introduces challenges like Vendor Lock-in and service provider dependencies