You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplest way to deploy and scale your web application in AWS
Provides end-to-end web application management
Programming languages (Go, Java, Node.js, PHP, Python, Ruby)
Application servers (Tomcat, Passenger, Puma)
Docker containers (Single and Multi Container Options)
No usage charges - Pay only for AWS resources you provision
Features: Load Balancing, Auto scaling and Managed Platform updates
Multiple Release Options
All at once – Deploy V2 to all existing instances in a SINGLE batch.
Rolling – Deploy V2 to existing instances in multiple batches.
Rolling with additional batch – Launches a new batch with V2 first. Each batch with V2 will replace existing instances with V1 deployed.
Immutable – Second ASG created with V2.
Traffic splitting – Canary testing approach. Deploy V2 to few new instances. Send a portion of traffic to V2 (While serving majority of users from V1).
(ADDITIONAL OPTION) BLUE GREEN with SWAP URL - Create New Environment with V2 instances. Test them. SWAP URL of V1 environment with V2 environment. One time switch!
App Engine
Simplest way to deploy and scale your applications in GCP
Provides end-to-end application management
Supports:
Go, Java, .NET, Node.js, PHP, Python, Ruby using pre-configured runtimes
Use custom run-time and write code in any language
Connect to variety of Google Cloud storage products (Cloud SQL etc)
No usage charges - Pay for resources provisioned
Features:
Automatic load balancing & Auto scaling
Managed platform updates & Application health monitoring
Application versioning
Traffic splitting
Azure App Service
Fully managed platform for building, deploying and scaling your web apps
Also supports REST APIs, and mobile back ends
Natively supports .NET, .NET Core, Node.js, Java, Python and PHP
Choose App Service plan: defines a set of compute resources for a web app
Features:
Automated Deployment and management
Auto Scaling
Built in Load Balancing
App Engine vs AWS Elastic Beanstalk vs App Service
Feature
AWS Elastic Beanstalk
App Engine
Azure App Service
Recommended for
Simple Web Apps and Batch Apps
Simple Web Apps and Batch Apps (For simple microservices)
Simple Web Apps
Quick Database Integration
Amazon RDS, Amazon DynamoDB
Firestore, Cloud SQL
Azure Cosmos DB MongoDB, Azure SQL Database, Azure Database for MySQL
Batch Programs
Worker Tier with SQS integration
Asynchronous task queues - Pub Sub
NA (Recommended Service: Azure Batch)
Hierarchy
Application > Application version > Environment
Application > Service > Version
App Service > Web App, API App, or Mobile App
Run Containers
Yes
Yes (App Engine flexible)
Yes
New Releases
Rolling updates, blue/green deployment (using Swap URL)
Rolling updates, blue/green deployment
Blue/green deployment(Using deployment slots)
Container Orchestration
Amazon Web Services - Container Orchestration
Microservices are built in multiple languages (Go, Java, Python, JavaScript, etc)
Containers simplify deployment of microservices:
Step I : Create a self contained Docker image
Application Runtime (JDK or Python), Application code and Dependencies
Step II : Run it as a container any where
Local machine OR Corporate data center OR Cloud
How do you manage 1000s of containers?
Elastic Container Service (ECS) - Fully managed service for container orchestration
Step I : Create a Cluster (Group of one or more EC2 instances)
Step II: Deploy your microservice containers
AWS Fargate: Serverless ECS. DON'T worry about EC2 instances.
Cloud Neutral: Kubernetes
AWS - AWS Elastic Kubernetes Service (EKS)
Google Kubernetes Engine (GKE)
Managed Kubernetes service
Provides all important container orchestration features:
Auto Scaling
Service Discovery
Load Balancer
Self Healing
Zero Downtime Deployments
Provides Pod and Cluster Autoscaling
Enable Cloud Logging and Cloud Monitoring with simple configuration
Uses Container-Optimized OS, a hardened OS built by Google
Azure Container Orchestration - AKS and Service Fabric
Using a Container Orchestrator:
1: Create a Cluster
2: Deploy & Orchestrate Microservices
Azure Services:
Azure Kubernetes Service: Managed Kubernetes Service
Azure Service Fabric: Microsoft's container orchestrator
Google Cloud Functions
Going Serverless with AWS Lambda
Serverless - ** Don't worry about servers. Focus on building your app**
Remember: Serverless does NOT mean "No Servers"
Serverless for me:
You don't worry about infrastructure
Flexible scaling and automated high availability
Pay for use NOT FOR SERVERS
You focus on code and the cloud managed service takes care of all that is needed to scale your code to serve millions of requests!
AWS Lambda - Write and Scale Your Business Logic
Supports Node.js (JavaScript), Java, Python, Go, C# and more..
Don't worry about servers or scaling or availability
Pay for Use: Number of requests, Duration of requests and Memory Configured
Free tier - 1M free requests per month
Integrates with AWS X-Ray(tracing), AWS CloudWatch (monitoring and logs)
Cloud Functions
Run code in response to events
Write your business logic in Node.js, Python, Go, Java, .NET, and Ruby
Don't worry about servers or scaling or availability (only worry about your code)
Pay only for what you use
Number of invocations
Compute Time of the invocations
Amount of memory and CPU provisioned
Time Bound - Default 1 min and MAX 60 minutes (2nd gen) for HTTP functions
Each execution runs in a separate instance
No direct sharing between invocations
Azure Functions
You don't worry about servers or scaling or availability
You only worry about your code
You pay for what you use
Number of requests
Duration of requests
Memory consumed
Supports C#, Python, JavaScript, Typescript and Java
CloudHSM: Dedicatedsingle-tenant HSM for regulatory compliance
(Remember) AWS KMS is a Multi-tenant service
Cloud KMS vs AWS KMS
Cloud KMS is very similar to AWS KMS
Create and manage cryptographic keys (symmetric and asymmetric)
Control their use in your applications and GCP Services
Provides an API to encrypt, decrypt, or sign data
Use existing cryptographic keys created on premises
Integrates with almost all GCP services that need data encryption:
Google-managed key: No configuration required
Customer-managed key: Use key from KMS
Customer-supplied key: Provide your own key
Cloud HSM: FIPS 140-2 Level 3 certified HSMs (Similar to AWS CloudHSM)
Azure Encryption services (similar to KMS)
Key Vault
Provides security solution and works with other services by providing a way to manage, create, and control encryption keys stored in hardware security modules (HSM).
Most popular, very flexible & inexpensive storage service
Store large objects using a key-value approach
Objects are stored in buckets:
Bucket names are globally unique and used as part of object URLs
Can contain ONLY lower case letters, numbers, hyphens and periods
Unlimited objects in a bucket
Provides REST API to access and modify objects
Provides unlimited storage:
Objects are replicated in a single region (across multiple AZs)
Store all file types - text, binary, backup & archives:
Media files and archives
Application packages and logs
Backups of your databases or storage devices
Staging data during on-premise to cloud database migration
Amazon S3 - Important Features
Amazon S3 Versioning(Optional - Enabled at bucket level):
Protects against accidental deletion
How do you save costs and move files between storage classes?
Solution: S3 Lifecycle configuration
Two kinds of actions:
transition actions (one storage class to another)
expiration actions (delete objects)
Different kinds of data can be stored in Amazon S3
Huge variations in access patterns
Trade-off between access time and cost
S3 storage classes help to optimize your costs while meeting access time needs
Designed for durability of 99.999999999%(11 9’s)
Amazon S3 Storage Classes
|Storage Class|Scenario|
|--|:--|:--|
|Standard|Frequently accessed data|
|Standard-IA|Long-lived, infrequently accessed data (backups for disaster recovery)|
|One Zone-IA|Long-lived, infrequently accessed, non-critical data (Easily re-creatable data - thumbnails for images)|
|Intelligent-Tiering|Long-lived data with changing or unknown access patterns|
|Glacier|Archive data with retrieval times ranging from minutes to hours|
|Glacier Deep Archive|Archive data that rarely, if ever, needs to be accessed with retrieval times in hours|
|Reduced Redundancy (Not recommended)|Frequently accessed, non-critical data|
Google Cloud Projects and Azure Subscriptions can be moved to different owner (Account or Organization). However, AWS resources are tied to an AWS Account.
A Google Cloud project is conceptually similar to the Azure subscription, in terms of billing, quotas, and limits.
However, from a functional perspective, a Google Cloud project is more like a resource group in Azure. It's a logical unit that cloud resources are deployed to.
Organizing Resources in AWS
Where do we create resources in AWS?
In an AWS Account!
By default, you will be billed per AWS Account!
What if you want to create resources for multiple environments?
One of the recommended approaches is to create separate AWS accounts
Each AWS account provides natural security, access and billing boundaries
Create AWS Organization to organize accounts into Organizational Units (OU)
Consolidated bill for AWS accounts
Use AWS Resource Access Manager to share AWS resources:
Azure Database for MySQL and Azure Database for PostgreSQL, Azure SQL Database
NoSQL
Amazon DynamoDB, Amazon DocumentDB
Datastore/Firestore, Cloud Bigtable
Azure Cosmos DB
In-memory
Amazon ElastiCache
Memorystore
Azure Cache
Data warehouse
Amazon Redshift
BigQuery
Azure Synapse Analytics
Migration of databases
Database Migration Service
Database Migration Service
Database Migration Service
Synchronous vs Asynchronous Communication
Synchronous Communication:
What if your logging service goes down?
Will you applications go down too?
What if there is high load?
Log Service unable to handle and goes down
Asynchronous Communication:
Create a queue or a topic
Your applications put the logs on the queue
Picked up when the logging service is ready
Good example of decoupling!
(Possible) Multiple logging service instances reading from the queue!
Two Types:
Pull based
Push based
|Producer Consumer (using Pull)|Simple Queue Service (SQS)|Cloud Pub/Sub|Queue Storage, Azure Service Bus|
|Publish Subscribe (Push)|Simple Notification Service (SNS)|Cloud Pub/Sub|Azure Service Bus|
|Real-time data ingestion service (event-driven systems and streaming analytics)|Amazon Kinesis|Cloud Pub/Sub|Azure Event Hubs|
AWS - Amazon SQS and Amazon SNS
Pull Based: Amazon SQS
Producers put messages. Consumers poll on queue.
Only one of the consumers will successfully process a message
Standard Queue
Unlimited throughput
BUT NO guarantee of ordering (Best-Effort Ordering)