Monday, March 8, 2021

AWS - General Design Principals (Serverless)

Take in consideration below given General design principal while designing serverless application

  1. Simple & Singular: Keep functions single purpose and simpler
  2. Design for concurrent requests not total requests: Leverage concurrency  
  3. Orchestrate application with State machine: Use Step functions for big process not with underlying functions chaining
  4. Do not share anything : As lifespan of function is short, you can't rely on storing and sharing in runtime memory of function
  5. Do not write hardware dependent code: As its short lived and get changed 
  6. Design for failure & care for duplicates: For failures make sufficient retries, as well as ensure that it would not generate duplicates   

Saturday, March 6, 2021

AWS - Serverless Layers

 There are 6 layers of serverless application architecture

  • Compute Layer
    • Lambda
    • API Gateway
    • Step functions

  • Data Layer
    • Database
    • S3
    • App sync
      API provides data combining from multiple sources
    • Elastic search 
      Fast search on multiple data sources

  • Messaging & Streaming Layer
    • SNS
    • Kinesis streams (realtime data loading and processing)
    • Kinesis data firehose
      Captures, transforms, and loads streaming data into Kinesis Data Analytics, Amazon S3, Amazon Redshift, and Amazon ES

  • User Management & Identity
    • Cognito
      you can easily add user sign-up, sign-in, and data synchronization to serverless applications. Amazon Cognito user pools provide built-in sign-in screens and federation with Facebook, Google, Amazon, and Security Assertion Markup Language (SAML)

  • Edge Layer
    • Cloud Front

  • System Monitoring & Deployment
    • Cloud watch
    • X-Ray
      Analyze and debug serverless applications by providing distributed tracing and service maps to easily identify performance bottlenecks by visualizing a request end-to-end.
    • Serverless Application Model (AWS SAM)
      An extension of AWS CloudFormation that is used to package, test, and deploy serverless applications. The AWS SAM CLI can also enable faster debugging cycles when developing Lambda functions locally

CI/CD - Safe DB Changes/Migrations

Safe DB Migrations means updating your database schema without breaking the running application and without downtime . In real systems (A...