Here we cover information related to server-less application deployments on AWS cloud.
Compute Layer - manages requests from external systems; runtime environment with business logic
- AWS lambda - lets run stateless apps, provided as a managed services platform; supports micro-services architecture; lambda functions can be deployed onto the platform;
- can integrate with API gateway to execute fully-managed REST APIs; lambda functions can house the business logic [services / data / resource tier APIs]
- AWS step functions - used to orchestrate server-less workflows; orchestration includes combining multiple steps of long-running executions;
- AWS Elastic Container Service (ECS) - like docker, run on a container engine, it's portable; provides isolation benefits of virtualization with less overhead & faster starts than VMs; is packaged with application, libraries, runtime & tools; deployed in a cluster, contains task definitions (similar to dockerfile) and container definitions;
- at runtime, applications are executed as 'task's, 'service's container images are housed in a container registry;
- AWS Fargate - server-less container engine; built on EKS - elastic kubernetes services; can integrate fargate with EKS & ECS ---> docker / container images are housed in ECR (elastic container registry);
- with ECR, we got to pay for storage & data transfer - similar to S3; cost factor to consider number of container images to house inside ECR;
- ECS + ELB = can be launched on EC2 & Fargate instance types;
- AWS Elastic Beanstalk - deploy code without worrying about the underlying infrastructure; EC2 instances, security groups, VPCs, sub nets will all be configured automatically;
- Beanstalk has an option where you upload your code and the language options are determined by AWS;
- it can be scalable & configured behind an application load balancer, with auditing on cloudtrail;
- cloud watch alarms, load-balancer listeners, auto-scaling groups are all configured when you create Elastic Beanstalk instance;
Data Layer - persistent storage; mechanism to trigger events in response to data changes
- Dynamo DB - gels well with server-less applications by providing managed No-SQL DB persistent storage layer;
- integrate with Dynamo DB streams - to analyze streaming events at real-time
- accelarator (DAX) - in-memory cache - can be used with server-less application deployments;
- Amazon S3 - integrated with Amazon Cloudfront CDN, can deliver static web content
- Elasticsearch service - log analytics, text search, application monitoring, etc;
- DataSync - managed GraphQL service with real-time & offline capabilities; provides data-driven API to connect to services such as Dynamo DB, S3 & elastic-search;
Messaging & streaming layer - manage communications between components; streaming layer manages real-time analysis & processing of streaming data;
- AWS SNS - messaging service for pub/sub patterns (async events); supports micro-services, distributed systems & server-less applications
- Amazon Kinesis - analyze real-time streaming data;
- kinesis data-analytics can run standard SQL / build streaming applications using SQL
- kinesis fire-hose performs ETL into Kinesis data-analytics, S3, Redshift, ES to enable real-time analytics
User management & identity layer - authentication & authorization management
- AWS Cognito - to manage federated identities (google, facebook, amazon) with SAML
Edge layer - enhance connectivity & manage presentation layer workload to customer nearest to their geographic location
- CloudFront - CDN delivers application content with low latency & accelerated transfer speed
Systems monitoring - analytics & audit trail, derive metrics; troubleshooting & insights for problem / incident management
- Cloudwatch - access system metrics, configure business KPIs, consolidate system & application logs, configure alerts & events per threshold;
- X-Ray - analyze & debug server-less applications; distributed tracing & service maps to quickly troubleshoot issues / identify performance bottlenecks visualizing request flow end-to-end;
- SAM (Serverless Application Model) - extension of AWS cloud formation used to package, test & deploy server-less applications;
Deployment approaches - consumer awareness, analyzing impact of introducing a change in API - ensuring no impact to consumers is desired; to avoid risks for consumers - routing requests to an alternate sub-domain [blue/green or canary deployments] is an alternative; points to consider are - consumer impact, deployment duration / speed, automated tests / validation ensuring functionality as normal & rollback strategy in the case of a failure;
AWS whitepaper for server-less application deployments covers various deployment scenarios in detail; here, we summarize the important considerations applicable for server-less deployments:
- availability & reliability of the application / workload components, platform & infrastructure - ensured by AWS
- utilize & integrate managed services as much as possible - to reduce workload management allowing cloud provider (AWS in this case) to manage workload components - except for application / core functional logic
- apply AI & ML services - for scenarios where repetitive manual activities can be transformed to intelligent, interactive, intuitive & automated services
- examples include automated ticket management system, voice-to-text & text-to-voice translation, voice recognition, face detection / recognition, personality analytics & insights, etc.
- advanced mathematical techniques such as K-means clustering, kNN, linear regression, logistic regression, decision trees, naive bayes, random forest, etc. can be applied on the data; aids take informed decisions;
- To process event-streams at real-time, use AWS lambda & AWS Kinesis;
- kinesis producer library (KPL) can be used to process the data ingested, while processed data can be stored in Dynamo DB;
- use kinesis data firehose when ingested data needs to be loaded to S3 / Redshift / ES continuously
- use kinesis data analytics to perform standard SQL queries on streaming data ingested;
AWS offers caching solutions as a managed service, Elasticache supports memcached & redis; memcached is an in-memory cache; redis cache stores data persistently;
AWS AppSync - it's used for server-less development & deployment; commands related are appsync push, publish; use command line to push app changes to S3; define roles related to DB access & web-server access; these roles are associated with IAM; AppSync creates Cloud Formation stack to publish changes into S3 bucket;
No comments:
Post a Comment