Introduction to Serverless Computing
Serverless computing is a manner of providing backend services on an as-used basis. Company that gets backend services from a serverless vendor and they get charged based on the usage, not on a fixed amount of bandwidth they used and not on a fixed number of servers.
- Automatically provisions the compute resources required to run application code on request, or in response to a specific event.
- Automatically scales those compute resources up or down depending on increased or decreased demand.
- Automatically scales compute resources set to zero when the application is not running.
In the AWS, Lambda allows you to instantly perform almost any operation on demand at almost any time but without having to provision and pay for always-on servers. Serverless computing allows developers to build apps without the headache of managing infrastructure and other data center overhead.
Features of Serverless Computing are:
- Provision a server
- Ensure its functionality
- Create test environments on a server
- Maintain server uptime
- Zero server management
- Scaling options
- Optimal availability
- Eliminates idle capacity
Benefits of Serverless Computing
- Simplified operations
- Boosts productivity
- Effortless efficiency
- Serverless Computing enables developers to focus on writing code, not managing infrastructure.
- Serverless customers pay for execution only.
- Serverless is a polyglot environment.
- Serverless Computing can be both faster and more cost-effective than other forms of compute.
- Serverless Computing application development platforms provide near full visibility into the system.
- Serverless Computing scales up and down on demand in response to workload, it offers significant cost savings for spiky workloads.
- Serverless Computing architectures are scalable and scale from up and down to zero, they also sometimes need to start up from zero to serve a new request.
- These operational tasks are challenging in any distributed system, but a move serverless architecture only exacerbates the complexity.
- Vendor lock-in.
Understanding the Serverless Stack
- Functions as A Service (FaaS): FaaS is an important component as the central/foundational compute/processing engine in serverless and sits in the center of most serverless architectures.
- Serverless Databases and Storage: A Serverless approach to these technologies involves transitioning away from provisioning instances with defined capacity, connection and query limits, and moving toward models that scale with demand in both infrastructure and pricing.
- Event Streaming and Messaging: Serverless architectures are well suited for event driven and streaming, most preferably open source Apache Kafka event streaming platform.
- API Gateway: API gateway acts as proxies to web actions and provides HTTP service, client ID and secrets, rate limits, CORS, viewing API usage, viewing response logs, and API sharing policies.
Use cases for Serverless
- Serverless and Microservices: The microservices model is used to create small services that do a single job and communicate with one another using APIs.
- API backend: Serverless platform can be turned into a HTTP. When it is enabled for web requests, these actions are called web actions. Once the web actions are ready, you can assemble them into a fully featured API with an API gateway that brings additional security, OAuth support, rate limiting, and custom domain support.
- Data Processing: Serverless Computing is very suitable for structured with text, audio, image, and video data, around tasks such as data enrichment, transformation, validation, cleansing; PDF processing; audio normalization; image processing i.e. rotation, sharpening, noise reduction, thumbnail generation, optical character recognition (OCR) and video transcoding.
- Stream Processing Workloads: Apache Kafka with FaaS and database/storage offers a powerful feature for real-time build outs of data pipelines and streaming apps. These architectures are ideally suited for data stream ingestions (for validation, cleansing, enrichment, transformation), including IoT sensor data, application log data, financial market data and business data streams.
Serverless computing is an architecture where code execution is totally managed by a cloud provider, instead of the traditional method of developing applications and deploying them on servers. In this way developers don’t have to worry about managing, provisioning and maintaining servers when deploying code.