Sunday, October 17, 2021

 Databases on AWS:

AWS provides fully managed database services to support relational, NoSQL, in-memory databases.

  • Amazon RDS is fully managed RDBMS offering with six different engines Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle and Microsoft SQL Server. 
  • With RDS, CPU, memory, storage and IOPS can be scaled independently.
  • Provides and maintains Multi-AZ deployment. Primary DB instance is synchronously replicated to standby replica in different availability zones for failover support
  • RDS also offers reserved DB instances for 1-3 years with significant discount
Amazon Aurora RDS is fully managed high performance, highly scalable and high availability offering from AWS. 5x higher throughput than standard MySQL database or PostgreSQL

Amazon DynamoDB is a fully managed NoSQL database to store and retrieve any amount of data. Supports only Eventual and strongly consistent read models


Amazon RedShift : fully managed data warehouse service in the cloud which can be scaled up to petabytes or more on redshift cluster. Uses ML to predict incoming query runtime for fast runtime. Uses result caching for repeated queries. Backup is automated on S3.

ElastiCache: is a web service providing scalable high performance caching solution or in-memory data store. Automatically modifies itself to scale out or scale in as per app requirement. 


Monday, October 11, 2021

 Amazon S3: Amazon Simple Storage Service

is a cloud based storage offering which can be maintained and accessed over the internet. Can be accessed also programmatically using Amazon provided APIs. Highly durable and data replication across multiple data centre in a region. S3 offers eventual consistency model.


Storage classes
With Amazon S3, you can store data across a range of different S3 Storage Classes.
S3 Standard, S3 Intelligent-Tiering, S3 Standard-Infrequent Access, S3 One Zone-Infrequent Access, S3 Glacier, S3 Glacier Deep Archive, and S3 Outposts.

Monday, October 4, 2021

AWS Load Balancer and Auto Scaling Case Study

Problem: Migrate infrastructure from on-premise to AWS to cut down expenses and handle increase in load requests. Create Load Balancer for load distribution, distribute traffic and scale up/down based on CPU utilization. 

Step1: Create two EC2 instances

Step2: Install Apache web server by logging on thru Putty

Step3: Create Target Group policy (Blue, Green) for each instance

Step4: Create an application Load Balancer with weighted rule to forward 70 % traffic to blue and remaining to green target group

Step4: Auto Scaling is based on Launch configuration which implicitly works by AMI. Lets create AMI by stopping one of EC2 instance.

Step5: Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. Amazon Route 53 is fully compliant with IPv6 as well.

Create hosted zone for the company domain and update the AWS nameservers to domain sites. Now create record in Route 53 to route traffic to Load Balancer.

E2E flow is: Client browser-->Domain NamespaceRoute 53→ App Load Balancer→ Green/Blue target group→ Auto Scale in/out EC2 instance AMI based on CPU Utilization monitored by CloudWatch Alarm


Step6: Create Launch config with AMI and create auto Scaling Group with this launch config. attach the load balancer and specify target groups


Step7: define Auto Scaling policy by creating alarm in cloudwatch to monitor CPU usage


Move to Auto Scaling group to define dynamic scaling policy based on the alarms created