⛅ Architecture Patterns for building Serverless Applications ⚡

·

2 min read

🎯 Modernizing with Serverless-First Approach

🎯 Architecture Patterns for building Serverless-App.

Benefits of Serverless Computing (Lambda) ⚡

  • No infrastructure provisioning, no management
  • Automatic scaling
  • Pay-for-use
  • Highly available and secure

Pattern 1. Serverless Web Applications - Serverless Backend

Use-case 1: Performance Dashboard Solution

Figure 2: Serverless Backend

  • Amazon API-Gateway

    • A managed API platform that is compatible with OpenAPI
    • From edge to private APIs (Edge, regional, access to VPC and private APIs) + From API to any endpoint (inside or outside of AWS Cloud).
    • Monitored & traced via CloudWatch and X-Ray.
    • Super easy Lambda Integration.
    • A wide range of features - models, cache, and usage plans

Figure 2. API Gateway - Serving Dynamic Content

Pattern 2. Serverless Web Applications - GraphQL Serverless Backend

Use-case 2: SmartChat WhatsApp-like Real-Time & Offline Messaging Web-App

Figure 3. GraphQL Serverless Backend

Managing Costs for Serverless Workloads

  • [x] Lambda Power Tuning: Utilize Lambda Power Tuning to decide how much memory to allocate to lambda functions to achieve the right performance and cost balance.
  • [x] Compute Optimizer is a passive approach that uses machine learning algorithms to analyze the function executions and recommend changes to enhance performance and reduce costs.
  • [ ] Lambda - Provisioned concurrency
  • [ ] Lambda - Log tuning
  • [ ] Lambda – AVX2

[Performance Dashboard] Path to Modernization

  • [x] Step 1. Strategy

    • [ ] Re-platform
    • [ ] Refactor
    • [x] Build New
  • [x] Step 2. Pilot

    • [ ] Move to manage
    • [x] Build new with serverless
  • [x] Step 3. Define

    • [x] Development practices
    • [x] Operational expertise
    • [x] Deployment best practices
    • [x] Cost management & governance
  • [ ] Step 4. Optimize

    • [x] Decrease build & deployment time
    • [ ] Increase TCO
    • [ ] Increase time to market
  • [ ] Step 5. Scale

    • [ ] Organization wide
    • [ ] Critical workloads
    • [x] Global reach
  • ✍️ Accelerate your organization-wide adoption (Define | Optimize | Scale):

    • [ ] Enable Cloud Center of Excellence (CCOE) for Cloud Native apps
    • [ ] Establish a Shared Services Platform (SSP)
    • [ ] Build a community

Building an End-to-End Serverless Web Application

1. Business Case: [TODO]

2. Frontend: React.js: [TODO]

3. Backend: Node.js [TODO]

4. IaC: CDK [TODO]

5. Open-Source [TODO]: github.com/OceanSoftIO/Serverless