Friday, September 30, 2022

AWS - DynamoDB Auto scaling

How DynamoDB auto scaling manages throughput capacity for a table.





  1. Create an Application Auto Scaling policy for your DynamoDB table.
  2. DynamoDB publishes consumed capacity metrics to Cloud Watch.
  3. If the table's consumed capacity exceeds your target utilization (or falls below the target) for a specific length of time, Cloud Watch triggers an alarm and you can view the alarm on the console and receive notifications using Amazon Simple Notification Service (Amazon SNS).
  4. Cloud Watch alarm invokes Application Auto Scaling to evaluate your scaling policy.
  5. Application Auto Scaling issues an UpdateTable request to adjust your table's provisioned throughput.
  6. DynamoDB processes the UpdateTable request, dynamically increasing/decreasing the table's provisioned throughput capacity so that it approaches your target utilization.

Wednesday, August 10, 2022

Resolving Web Addresses

Some important concepts

  • DNS: Domain Name System, translates human readable domain names (for example, www.Azure.com) to machine readable IP addresses (for example, 20.43.132.131)

  • Some top level domain examples: 
    • .com
    • .gov
    • .gov.uk
    • .co.in
    • .com.au

  • Some domain registrars:
    • Amazon
    • GoDaddy
    • 123-reg.co.uk

  • Start of Authority (SOA) : SOA is a set of data that provides critical resources for the Domain Name System that helps to validate domains on the Internet. It contains information of
    • Administrator
    • Server 
    • time-to-live etc.

  • NS Record: Name Server Record tells the Internet where to go to find out a domain's IP address. A domain often has multiple NS records which can indicate primary and secondary nameservers for that domain. Without properly configured NS records, users will be unable to load a website or application.

    Example: 
example.comrecord type:value:TTL
@NSns1.exampleserver.com21600

Note that NS record never points to CNAME record

  • A Record: A record is fundamental record type provides the associated IP address for the domain name.  Example:  www.Azure.com --> 20.43.132.131

  • TTL (Time-to-live): Either resolving server or local user machine cache IP info related to domain name for the TTL. So any change in IP for a domain takes the time mentioned in TTL to take effect on internet.

  • Canonical Name Record (CNAME): CNAME is just used to point one name to another.
    Example: example.com to www.example.com, ultimately it point same IP address.

  • Alias Record: It works same as CNAME to referencing other name. the difference is a CNAME can't be used for naked domain name. 
    Example: used for cloudfront, load balancers, S3 buckets those configured as websites.

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...