Monday, June 29, 2020

OCI Traffic Management Geo-Location based Steering Policy

9:15 AM Posted by Dilli Raj Maharjan No comments



Global steering policy is needed to route users from a region to service instance in that respective region. Depending upon the user's geolocation and IP prefix of the source IP address, OCI Steering policy will return different answers to the DNS query for the application. Geolocation steering dynamically routes request to approprite response pool based on the physical location of the client. OCI will monitor the primary endpoint (via Oracle Health Checks) and reroute all traffic to a failover location if the primary endpoint is unresponsive. 

Geolocation Steering

Geolocation Steering consists of multiple steps as below:

  1. Creating DNS Zone.
  2. Creating web servers in multiple regions.
  3. Creating Traffic management Steering policies.

Creating DNS Zone

We can create zones, add records to zones, and allow Oracle Cloud Infrastructure's edge network to handle our domain's DNS queries. In my case I am creating DNS zone for my domain cloudnepal.org. I have set my zone type as primary and Added oracle cloud nameserver to my domain's nameserver list.

Following is the step by step process to create DNS Zone for my domain cloudnepal.org.

Click on Navigation menu > Networking > DNS Zone Management.



On the landing page click on Create Zone button to create a zone.



Since I am going to add all the details manually. I have selected method MANUAL. Provided zone name as cloudnepal.org and zone type as Primary and click on Create to create the zone.



Once zone creation is completed, click on Zone name to view details of the name servers.



Namservers will be displayed in the zone information page. Add these name servers in your domain's name server's list.


Creating web servers in multiple regions.

We are going to create two web servers in US East region and Germany Central Frankfurt regions. We will route all the traffic generated from US to the web server hosted in US region and all the traffic generated from Europe to the web server hosted in Germany Frankfurt.

Following is the web server instance created in US region.



While accessing web page using IP address following is the page that is displayed.



Similar I have next web server instance created in Germany Frankfurt.


Following is the web page that get displayed when I access web pages from web server created at Germany Frankfurt.




Creating Traffic Management Steering Policy

Now we are going to create traffic management steering policy which will route all the traffic from US to web server created in US region, all traffic from Europe to web server hosted in Germany, and all traffic from rest of the place will be route to US and failover to Germany.

Click on Navigation menu > Networking > Traffic Management Steering Policies



Click on Create Traffic Management Steering Policy button in the landing page.



Select GEOLOCATION STEERING option and Provide the name of Policy.



Provide the answer pool name, answer name, type of record and IP address of the web server in US. 



Provide second Answer pool details. Provide Answer pool name, name of Answer, record type and IP address of the server hosted in EU region.



Create Geolocation Steering Rules.  Provide GEOLOCATION, Name of the pools and click on +Additional Rules to add addition Steering Rules.


Add second GeoSteering rules, Provide GEOLOCATION and name of the POOL. Click on Add Global Catch-all. Catch-all will define rules for all the locations beside defined on the rules. In our case all the locations beside Europe, North America and South America will match on the Catch-all rule and route traffic as define on the list of the pool.



Add pool for the Global Catch-all.



Health Check will check the health status of the backend server using defined protocol. If any server fails in Health check, traffic will be route to next available pool. In my case, there is no Health Check defined so I am adding new one. Provide Health check name, interval in second that health check to be performed and the protocol that is used.


Next part is to attach the policy to domain(s). Once this policy get attached to the domain specified it will route traffic as per the define policy. Select the domain name from the drop down and Click on Create Policy.



Once Steering policy is created we can view detail of the policy.



Browsing website from my location(Aish/Nepal) I am getting web page from server hosted in US region. In this case, rule defined for Global Catch-all get matched and my DNS request get resolved to the server in US. In the case when US server is not healthy or not available the next available server in EU get resolved.




Next, I set web Proxy server to one of the free web proxy server in New York and accessed the page. In this case my DNS request get resolved and returned IP address of the server in the US.

Setting US based free web proxy to the browser.



My DNS request get resolved to IP address of the web server created in US.


Now I set web Proxy server to one of the free web proxy server in France/Europe and accessed the page. In this case my DNS request get resolved and returned IP address of the server in the Germany.

Setting France based free web proxy to the browser.



My DNS request get resolved to IP address of the web server created in US.


0 comments:

Post a Comment