Friday, March 24, 2023

AWS Routing policy, Route 53 terminologies, Pricing.

 AWS Routing Policy:

Routing policy in AWS Route 53 determines how traffic is distributed to your resources based on the client's request. There are several routing policies available in Route 53, including:

  1. Simple Routing: It is used when there is only one resource to route traffic to. It responds with a single IP address.

  2. Weighted Routing: It allows you to distribute traffic across multiple resources based on the percentage of traffic you specify.

  3. Latency Routing: It routes traffic based on the lowest network latency for the client.

  4. Failover Routing: It allows you to set up a primary resource and a secondary resource, which is used in case the primary resource fails.

  5. Geolocation Routing: It routes traffic based on the location of the client.

  6. Multi-Value Routing: It returns multiple IP addresses for a resource and can help you achieve high availability.

Route 53 Terminologies:

  1. Hosted Zone: A container for all the DNS records for a particular domain name.

  2. Record Set: A collection of records that define how traffic is routed for a specific resource.

  3. Alias Record: A type of record that allows you to map a domain name to an AWS resource (such as an EC2 instance or an S3 bucket).

  4. TTL (Time to Live): The amount of time that a DNS resolver should cache a DNS record before it expires.

  5. Health Check: A test that Route 53 performs to determine the health of a resource.

Pricing:

AWS Route 53 pricing is based on the number of hosted zones and the number of queries that are processed. Hosted zones are charged based on a monthly fee, while queries are charged based on the number of queries processed per month.

The first 1 million queries per month are free, and beyond that, you are charged a per-query fee.

In addition to the standard pricing, Route 53 also offers a traffic flow service, which allows you to create complex routing policies based on different criteria. Traffic flow is charged based on the number of policy records and the number of DNS queries processed.

AWS Pre-Route 53 – how DNS works

 Before diving into AWS Route 53, it's important to understand how DNS works in general.

DNS (Domain Name System) is a system that translates human-readable domain names (such as www.example.com) into IP addresses that computers can understand.

When you enter a domain name in your web browser, your computer contacts a DNS resolver to get the IP address associated with that domain name.

The DNS resolver then returns the IP address to your computer, which can then connect to the web server associated with that IP address.

Here are the general steps that occur when a DNS lookup is performed:

  1. Recursive DNS resolver: Your computer sends a request to a recursive DNS resolver (often provided by your Internet Service Provider). The request includes the domain name that you want to look up.

  2. Root name servers: If the recursive DNS resolver doesn't have the IP address associated with the domain name in its cache, it contacts one of the 13 root name servers. These root name servers contain information about the top-level domain names (such as .com, .org, etc.) and can direct the request to the appropriate authoritative name server.

  3. Authoritative name server: The authoritative name server is responsible for storing the IP address associated with the domain name. If the authoritative name server has the IP address in its cache, it returns the IP address to the recursive DNS resolver. Otherwise, it contacts other authoritative name servers until it finds the IP address.

  4. Recursive DNS resolver: Once the recursive DNS resolver has the IP address, it returns the IP address to your computer, which can then connect to the web server associated with that IP address.

AWS Route 53 is a DNS service provided by Amazon Web Services that allows you to manage DNS records for your domain names.

With Route 53, you can create and manage DNS records, such as A records (which map a domain name to an IP address) and CNAME records (which map a domain name to another domain name).

In addition to managing DNS records, Route 53 also provides other features, such as traffic routing and health checks.

With traffic routing, you can configure Route 53 to route traffic to different endpoints based on geographic location, latency, or other criteria. With health checks, you can monitor the health of your resources (such as EC2 instances) and automatically route traffic away from unhealthy resources.

Overall, AWS Route 53 is a powerful tool for managing DNS for your domain names and routing traffic to your resources.

Using AWS load balancer with Auto Scaling

Create an Auto Scaling group: First, you need to create an Auto Scaling group that will automatically launch and terminate EC2 instances based on demand. You can define the minimum and maximum number of instances in the group, as well as the desired capacity.

  1. Create a launch configuration: Next, you need to create a launch configuration that defines the settings for an EC2 instance, such as the AMI, instance type, and security groups. When Auto Scaling launches new instances, it uses the launch configuration to create the instances.

  2. Configure load balancer: You need to configure the load balancer to distribute traffic across the instances in your Auto Scaling group. AWS provides several types of load balancers, including the Application Load Balancer and Network Load Balancer.

  3. Associate Auto Scaling group with load balancer: To ensure that traffic is distributed evenly across your instances, you need to associate your Auto Scaling group with the load balancer. This can be done using the AWS Management Console or the AWS CLI.

  4. Configure Auto Scaling policies: You can configure Auto Scaling policies to automatically adjust the number of instances in your Auto Scaling group based on demand. There are several types of scaling policies available, including target tracking, simple scaling, and step scaling.

  5. Test your configuration: Before deploying your configuration to production, it's a good idea to test your configuration in a staging environment. This will help you ensure that your load balancer is distributing traffic evenly across your instances and that your Auto Scaling policies are working as expected.

Overall, using AWS load balancer with Auto Scaling provides a flexible and scalable solution for managing your resources. By distributing traffic across your instances and automatically adjusting the number of instances based on demand, you can ensure that your application is highly available and responsive to user requests.

Time Intelligence Functions in Power BI: A Comprehensive Guide

Time intelligence is one of the most powerful features of Power BI, enabling users to analyze data over time periods and extract meaningful ...