Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the basis for realizing CDN dispatch

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Content distribution network (Content Delivery Network, referred to as CDN) is a distributed network, which is established and covered on the bearer network, and is composed of server groups of edge nodes distributed in different areas. CDN shares the pressure on the origin server, avoids network congestion, ensures that the distribution of website content is accelerated in different regions and different scenarios, and improves the speed of resource access. Many users will encounter some problems in the actual use of CDN. Today, the editor will introduce to you what the principle of cdn sub-network scheduling is based on.

Core ideas:

Based on the source IP address of the resolution request issued by the client, the geographical area where the client is located determines how to return the resolution result, so as to achieve the nearest scheduling of business traffic. DNS main configuration file / etc/named.conf file defines acl matching client IP different ACL matching client reads different regional database file DNS view technology maps ACL to regional database file, note that once DNS view technology is enabled, all areas must be included in the defined view.

I. introduction of network topology

II. Server configuration

1. Define the classification of resolution request traffic

Edit the bind main configuration file / etc/named.conf, and define the acl to classify the request traffic. For example, define three ACL to match the domain name resolution requests from Unicom, China Telecom and China Mobile respectively.

Acl cmnet {

192.168.39.0/24

192.168.10.0/24

}

Acl cunet {

192.168.38.0/24

192.168.20.0/24

}

Acl ctnet {

192.168.37.0/24

192.168.30.0/24

}

Allow-query {192.168.39.0 Universe 24 exodus 192.168.10.0 Universe 24Trent 192.168.20.0 Universe 192.168.30.0 Universe 24;}

two。 Define a parsed view

DNS view technology maps ACL to a region library file, and include refers to a region name file. Note that once the view is enabled, all areas must be included in the view, so you need to comment out or delete the zone and the last includ area file statement of the / etc/named.conf file, and then define it in the file referenced by the view.

View cmcc {

Match-clients {cmnet;}

Include "/ etc/named.rfc1912.zones.cmcc"

}

View cucc {

Match-clients {cunet;}

Include "/ etc/named.rfc1912.zones.cucc"

}

View ctcc {

Match-clients {ctnet;}

Include "/ etc/named.rfc1912.zones.ctcc"

}

Execute named-checkconf to check the configuration file for syntax errors

3. Create a zone file

Zone files are defined separately for each view. When DNS receives domain name resolution requests from three ISP customers, it reads three ISP corresponding zone files, maps three resolution library files respectively, and returns node A record resources of each ISP according to the source IP address of the domain name resolution request packet.

Define the area file / etc/named.rfc1912.zones.cmcc for the cmnet network

Zone "magedu.com" IN {

Type master

File "magedu.com.zone.cmcc"

}

Define the area file / etc/named.rfc1912.zones.cucc for the cunet network

Zone "magedu.com" IN {

Type master

File "magedu.com.zone.cucc"

}

Define the area file / etc/named.rfc1912.zones.ctcc for the ctnet network

Zone "magedu.com" IN {

Type master

File "magedu.com.zone.ctcc"

}

4. Define the parse library file

Define the corresponding cmnet user resolution library file / var/named/magedu.com.zone.cmcc

Define the corresponding cunet user resolution library file / var/named/magedu.com.zone.cucc

Define the corresponding ctnet user resolution library file / var/named/magedu.com.zone.ctcc

5. Check the parse library file for syntax errors

Chgrp named/ var/named/magedu.com.zone.cmcc

Chgrp named/ var/named/magedu.com.zone.cucc

Chgrp named/ var/named/magedu.com.zone.ctcc

6. Change the subordinate group of area file and parse library file to named

Chgrp named / etc/named.rfc1912.zones.c

Chgrp named/ var/named/magedu.com.zone.c

7. Perform rndc reload reload area

III. Client testing

Mobile network testing

Unicom network test

Telecom network test

If there's anything else you don't understand, you can find it in

The official website is looking for our CDN technical engineer, the CDN technical engineer has more than ten years of experience in the industry, so it will be more detailed and professional than the editor's answer. Official website link www.yisu.com

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report