EN_Cloud_Native - somaz94/DevOps-Engineer GitHub Wiki

Cloud-Native Applications & Serverless Computing

3. What is a Cloud-native application?

Cloud-native applications are designed from the ground up to take advantage of the scalability, elasticity, and flexibility of cloud computing architecture. It leverages a suite of technologies focused on building and running scalable applications in dynamic environments such as public, private, and hybrid clouds. Cloud-native applications are not only about where applications run, but also about how they are built, deployed, and operated. Cloud-native development, with its emphasis on microservices, containers, DevOps, and elasticity, aims to maximize the benefits of cloud computing to achieve more agile, scalable, and reliable software.

  • Designed for the Cloud
  • Microservices Architecture
  • Containers
  • DevOps and Continuous Delivery
  • Scalability
  • Resilience and Fault Tolerance
  • API-based Communication
  • Infrastructure as Code (IaC)

4. Serverless Computing

Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation and provisioning of servers. Serverless architecture allows users to write and deploy code without worrying about the underlying infrastructure. The term "serverless" is somewhat misleading; it means that servers are still used, but developers don't have to manage those servers.

Main Features

  • Event-driven: Serverless applications are often event-driven, operating in response to events or triggers from various cloud services (e.g., HTTP requests, file uploads, database events).
  • Scalability: It automatically scales according to application demand, capable of handling everything from a few requests per day to thousands per second.
  • Usage-based costing: Billing is based on the actual amount of resources consumed by the application, rather than on pre-purchased units of capacity.

Advantages

  • No server management required: Developers don't need to provision or maintain servers. The cloud provider handles all aspects of server management.
  • Cost-effective: There's no charge when your code isn't running, so you only pay for the compute time you use.
  • Scalability: Infrastructure automatically adjusts—expanding or contracting—in response to the application's needs.

Use Cases

  • Web Applications: Serving API requests or backend services for web applications.
  • Data Processing: Handling database change events, processing data streams, or managing file uploads.
  • Integrations: Connecting to and extending third-party services and APIs.

Providers

The major serverless computing providers include:

  • AWS Lambda
  • Azure Functions
  • Google Cloud Functions
  • IBM Cloud Functions

Example

Here's an example of a simple serverless function (AWS Lambda in Python) that returns the current time:

import json
import datetime

def lambda_handler(event, context):
    current_time = datetime.datetime.now().isoformat()
    return {
        'statusCode': 200,
        'body': json.dumps({'current_time': current_time})
    }

Back to List

⚠️ **GitHub.com Fallback** ⚠️