CDN acceleration method, device and system, medium, computer equipment and program product
By accelerating the domain name and analysis of the target IP address in the fusion CDN scene, the second -level CDN manufacturer provides the problem of waste and cost increases when providing accelerated services for multiple first -level CDN manufacturers, and has achieved more efficient efficiency Resource utilization and lower server costs.
Patent Information
- Application Number
- CN202411937054.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the converged CDN scenario, secondary CDN manufacturers need to accelerate the same domain name of multiple primary CDN manufacturers at the same time, resulting in wasting bandwidth and storage resources and increasing server costs.
By receiving the client's access request, the target CDN vendor is determined, the source domain name is mapped to the target acceleration domain name, and resolved to the target IP address, thereby distinguishing the access traffic of different first-level CDN vendors on the same CDN server.
It improves the utilization of bandwidth and storage resources, reduces server costs, and avoids the situation where the expenses of one first-level CDN vendor are transferred to another first-level CDN vendor.
Smart Images

Figure CN119363828A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer network technology, and in particular to a CDN acceleration method, device and system, medium, computer equipment and program product. Background Art
[0002] Content Delivery Network (CDN) is used to provide cache acceleration for users' access requests for specific domain names. The domain name to be accelerated will be resolved to the IP address of the CDN server. If there is a cache corresponding to the requested resource on the CDN server, the CDN system will directly respond to the client with the resource to achieve the purpose of domain name acceleration; otherwise, the CDN server will proxy the client request, access the real customer origin station, and cache the requested file on the CDN server.
[0003] Different CDN vendors may deploy their own CDN resources (computer rooms, servers, etc.) in different regions. Some websites may distribute their domain name access traffic to multiple CDN vendors to accelerate user access in all directions. In actual operations, there is a special situation called converged CDN. The original user may ask multiple first-level CDN vendors to provide CDN acceleration services for them. Multiple first-level CDN vendors allocate part of the services to second-level CDN vendors. At this time, the second-level CDN vendor needs to accelerate the same domain name of multiple first-level CDN vendors at the same time.
[0004] When a client accesses the domain name of the original user, the second-level CDN vendor needs to distinguish which first-level CDN vendor's traffic is integrated into the traffic, so as to bill each first-level CDN vendor separately. Currently, second-level CDN vendors use different CDN servers to provide domain name acceleration services for different first-level CDN vendors. The above method causes a waste of bandwidth and storage resources and increases server costs. Summary of the invention
[0005] In a first aspect, an embodiment of the present application provides a CDN acceleration method, the method comprising: receiving an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can assign the access request to the CDN service provided by a second-level CDN vendor for acceleration; determining a target CDN vendor that provides acceleration services for the access request from the multiple first-level CDN vendors; mapping the source domain name to a target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; resolving the target acceleration domain name to a target IP address, and returning the target IP address to the client, so that the client sends the access request to the CDN server of the second-level CDN vendor configured with the target IP address, and then accelerating the access request through the CDN server; the IP addresses obtained by resolving the acceleration domain names corresponding to different vendors are different IP addresses of the same CDN server.
[0006] In a second aspect, an embodiment of the present application provides a CDN acceleration device, the device comprising: a receiving module, used to receive an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can assign the access request to the CDN service provided by a second-level CDN vendor for acceleration; a determination module, used to determine a target CDN vendor that provides acceleration services for the access request from the multiple first-level CDN vendors; a mapping module, used to map the source domain name to a target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; a data return module, used to resolve the target acceleration domain name to a target IP address, and return the target IP address to the client, so that the client sends the access request to the CDN server of the second-level CDN vendor configured with the target IP address, and then accelerates the access request through the CDN server; the IP addresses resolved from the acceleration domain names corresponding to different vendors are different IP addresses of the same CDN server.
[0007] In a third aspect, an embodiment of the present application provides a CDN acceleration system, the system comprising: a DNS server, for receiving an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, the multiple first-level CDN vendors can assign the access request to the CDN service provided by a second-level CDN vendor for acceleration, determine a target CDN vendor providing acceleration service for the access request from the multiple first-level CDN vendors, map the source domain name to a target acceleration domain name corresponding to the target CDN vendor, resolve the target acceleration domain name to a target IP address, and return the target IP address to the client; different first-level CDN vendors correspond to different acceleration domain names; and a CDN server, configured with multiple IP addresses including the target IP address, for receiving the access request sent by the client based on the target IP address, and accelerating the access request; wherein, among the multiple IP addresses configured by the CDN server, the IP addresses obtained by resolving the acceleration domain names corresponding to different vendors are different IP addresses of the same CDN server.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present application.
[0009] In a fifth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present application when executing the program.
[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in any embodiment of the present application.
[0011] In an embodiment of the present application, after receiving an access request from a client for a source domain name, a target CDN manufacturer that provides acceleration services for the access request is first determined from multiple first-level CDN manufacturers, and then the source domain name in the access request is mapped to the target acceleration domain name corresponding to the target CDN manufacturer. Since different first-level CDN manufacturers correspond to different acceleration domain names and can be resolved to different target IP addresses, and the IP addresses obtained by resolving the acceleration domain names corresponding to different first-level CDN manufacturers are different IP addresses of the same CDN server of a second-level CDN manufacturer, the CDN server of the second-level CDN manufacturer can distinguish the first-level CDN manufacturer to which the traffic corresponding to the access request belongs based on the target IP address on the same CDN server, without using different CDN servers to provide domain name acceleration services for different first-level CDN manufacturers, thereby improving the utilization of bandwidth and storage resources and reducing server costs.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings herein are incorporated into the specification and constitute a part of the present application. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solutions of the present application.
[0014] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application.
[0015] Figure 2 It is a schematic diagram of an application scenario of another embodiment of the present application.
[0016] Figure 3 It is a flow chart of the CDN acceleration method of an embodiment of the present application.
[0017] Figure 4 It is a schematic diagram of a CDN acceleration system according to an embodiment of the present application.
[0018] Figure 5 It is a block diagram of a CDN acceleration device according to an embodiment of the present application.
[0019] Figure 6 It is a schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0021] The terms used in this application are only for the purpose of describing specific embodiments, and are not intended to limit the application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a variety of.
[0022] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0023] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0024] The basic idea of CDN is to avoid bottlenecks and links on the Internet that may affect the speed and stability of data transmission as much as possible, so as to make content transmission faster and more stable. By placing node servers in various places on the network to form a layer of intelligent virtual network on the existing Internet, CDN can redirect user requests to the service node closest to the user in real time based on comprehensive information such as network traffic and the connection and load status of each node, as well as the distance to the user and response time. Its purpose is to enable users to obtain the required content nearby, solve the problem of network congestion, and improve the response speed of users visiting websites.
[0025] Figure 1A schematic diagram of an application scenario in some embodiments is shown. The application scenario includes a client 10, multiple CDN servers 20, an origin server 30, and a Domain Name System (DNS) server 40. Among them, the multiple CDN servers 20 include a CDN server 201 deployed in the R1 region, a CDN server 202 deployed in the R2 region, and a CDN server 203 deployed in the R3 region. The client 10 can initiate an access request for a certain source domain name (assuming it is a.com). The DNS server 40 can resolve the domain name into a machine-readable IP address so that the computer can find and access the server where the website is located. If the domain name a.com is a domain name that needs to be accelerated, the DNS server 40 can map the domain name to the domain name of the CDN server 20 (hereinafter referred to as the accelerated domain name) based on CNAME (Canonical Name), and then resolve the accelerated domain name to the IP address of the CDN server 20. Among them, CNAME is a record type in the DNS system, called a canonical name record. It is used to map a domain name (also called an alias) to another domain name (also called a canonical name). CNAME records are usually used to implement the alias function of a domain name, so that one domain name can point to another domain name without changing the DNS A record or AAAA record.
[0026] Specifically, the DNS server 40 can intelligently resolve the access request of the client 10 to determine the region where the client 10 is located, and determine the CDN server 20 closest to the region where the client 10 is located, and then map the source domain name in the access request to the acceleration domain name of the CDN server 20 closest to the region where the client 10 is located, and further resolve the acceleration domain name to an IP address and return it to the client 10. Figure 1 As shown, the region where the client 10 is located is the R1 region, and the DNS server 40 can return the IP address of the CDN server 201 to the client 10. The client 10 can initiate an access request to the CDN server 201 based on the IP address. After receiving the access request, the CDN server 201 will first search for the data requested by the access request in the local cache. If the data is found, the found data will be directly returned to the client 10; if the data is not found, the CDN server 201 can return to the source server 30, and after obtaining the data from the source server 30, cache the obtained data and send the data to the client 10.
[0027] Understandably, Figure 1The illustration is only for illustrative purposes and is not intended to limit the present application. In other examples, the number of CDN servers 20 is not limited to that shown in the figure. In addition, the CDN server 20 may include multiple layers of server nodes. For example, in an example including two layers of server nodes, the CDN server 20 may be divided into edge nodes and parent nodes. The edge nodes are usually deployed in computer rooms at the edge of various regions (such as provinces or cities, etc.), and are physically closer to the client 10; the parent nodes are usually located in the center of the CDN network, and are physically farther away from the client 10.
[0028] CDN vendors usually have their own CDN resources (such as computer rooms and servers) in multiple regions and operators, but they cannot guarantee that all regions and operators can be covered. Usually, with the knowledge of the customer, they will modify the DNS coverage resolution to switch the traffic of some regions or operators to other CDN vendors to ensure better domain name acceleration service quality. A website with large traffic will also usually distribute its domain name access traffic to multiple CDN vendors to accelerate user access in all directions.
[0029] In actual operations, there is a special situation called converged CDN. The original user may ask multiple first-tier CDN vendors to provide them with CDN acceleration services. Multiple first-tier CDN vendors allocate part of their services to second-tier CDN vendors. At this time, the second-tier CDN vendor needs to accelerate the same domain name of multiple first-tier CDN vendors at the same time.
[0030] like Figure 2As shown, the domain name a.com of website A is provided with CDN acceleration services by two first-level CDN manufacturers (respectively denoted as manufacturer B and manufacturer C), among which manufacturer B and manufacturer C are responsible for the acceleration of traffic in different regions. Manufacturer B and manufacturer C both give part of their services to manufacturer D. At this time, manufacturer D needs to provide acceleration services for the access traffic of the same domain name a.com of manufacturer B and manufacturer C at the same time. When accessing a webpage with the domain name a.com, the client 10 first sends an access request for the source domain name a.com to the DNS server 40, and the DNS server 40 converts the source domain name a.com into the acceleration domain name of manufacturer D, so as to provide acceleration services for the domain name a.com through the CDN server 20 of manufacturer D. The CDN server 20 of manufacturer D can first search for the data accessed by the access request locally. If found, the found data will be returned to the client 10; if not found, the CDN server 20 of manufacturer D will return to the source to the CDN server 20 of manufacturer B or manufacturer C, cache the data obtained from the CDN server 20 of manufacturer B or manufacturer C, and send it to the client 10. When the CDN server 20 of manufacturer D returns to the CDN server 20 of manufacturer B, if the CDN server 20 of manufacturer B does not cache the data, the CDN server 20 of manufacturer B will continue to return to the source server 30, and after obtaining the corresponding data, cache the data and return it to the CDN server 20 of manufacturer D. The CDN server 20 of manufacturer D can cache the data returned by the CDN server 20 of manufacturer B and send it to the client 10. The specific processing process when the CDN server 20 of manufacturer D returns to the CDN server 20 of manufacturer C is similar and will not be repeated here.
[0031] In order to improve resource reuse, CDN vendors hope to use the same or a group of servers to process requests from vendors B and C. However, when client 10 accesses the domain name a.com of website A, it is very complicated to distinguish whether the request is counted as traffic integrated from vendor B or from vendor C in the same or a group of servers. If the statistics are wrong, the cost of one vendor may be counted to another. Therefore, in the integrated CDN scenario, secondary CDN vendors often use different CDN servers to provide domain name acceleration services for different primary CDN vendors. The above method causes a waste of bandwidth and storage resources and increases server costs.
[0032] Based on this, this application provides a CDN acceleration method, see Figure 3 , the method comprising: Step S11: receiving an access request from the client 10 for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and multiple first-level CDN vendors can allocate the access request to CDN services provided by second-level CDN vendors for acceleration; Step S12: determining a target CDN vendor that provides acceleration services for the access request from among multiple first-level CDN vendors; Step S13: Map the source domain name to the target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; Step S14: Resolve the target acceleration domain name to the target IP address, and return the target IP address to the client 10, so that the client 10 sends an access request to the CDN server of the secondary CDN manufacturer that is configured with the target IP address, and then accelerates the access request through the CDN server; the IP addresses obtained by resolving the acceleration domain names corresponding to different primary CDN manufacturers are different IP addresses of the same CDN server.
[0033] This application is based on the CDN manufacturer that provides acceleration services for access requests and maps the source domain name in the access request to the corresponding target acceleration domain name, and then resolves the target acceleration domain name to the target IP address. Since different first-level CDN manufacturers correspond to different acceleration domain names and can be resolved to different target IP addresses, and the IP addresses obtained by resolving the acceleration domain names corresponding to different first-level CDN manufacturers are different IP addresses of the same CDN server of the second-level CDN manufacturer, the CDN server of the second-level CDN manufacturer can distinguish the first-level CDN manufacturer to which the traffic corresponding to the access request belongs based on the target IP address on the same CDN server, without using different CDN servers to provide domain name acceleration services for different first-level CDN manufacturers, thereby improving the utilization of bandwidth and storage resources and reducing server costs.
[0034] The specific implementation details of the embodiments of the present application are illustrated below. In some embodiments, each step of the present application can be executed by the DNS server 40.
[0035] In step S11, the user may initiate an access request for a source domain name (assuming it is a.com) through the client 10. The client 10 may be an electronic device such as a mobile phone, a tablet computer, or a laptop computer. The DNS server 40 may obtain the access request sent by the client 10.
[0036] The above access request can be accelerated by the CDN services provided by multiple first-level CDN manufacturers. Among them, the first-level CDN manufacturer is a CDN manufacturer that provides acceleration services to the source website corresponding to the source domain name a.com. The CDN server 20 of the first-level CDN manufacturer can directly return to the source server 30 of the source website, that is, when the CDN server 20 of the first-level CDN manufacturer does not cache the data accessed by the access request, the CDN server 20 of the first-level CDN manufacturer can directly request the data accessed by the access request from the source server 30. The second-level CDN manufacturer is a CDN manufacturer that provides acceleration services to the first-level CDN manufacturer. The CDN server 20 of the second-level CDN manufacturer can return to the source of the CDN server 20 of the first-level CDN manufacturer, that is, when the CDN server 20 of the second-level CDN manufacturer does not cache the data accessed by the access request, the CDN server 20 of the second-level CDN manufacturer can directly request the data accessed by the access request from the CDN server 20 of the first-level CDN manufacturer.
[0037] For ease of description, the following description takes the case where the number of first-level CDN vendors is equal to 2 as an example, and the two first-level CDN vendors are respectively referred to as vendor B and vendor C. It can be understood that in other examples, the number of first-level CDN vendors may also be greater than 2.
[0038] In step S12 , the DNS server 40 may determine a target CDN vendor that provides acceleration services for the access request.
[0039] In some embodiments, access requests from different regions are accelerated by different first-level CDN vendors. For example, access requests from region R1 are accelerated by vendor B, and access requests from regions R2 and R3 are accelerated by vendor C. Therefore, the target CDN vendor that provides acceleration services for the access request can be determined based on the region to which the access request belongs.
[0040] In other embodiments, access requests from different operators are accelerated by different first-level CDN vendors. For example, access requests from operator M1 are accelerated by vendor B, and access requests from operator M2 are accelerated by vendor C. Therefore, the target CDN vendor that provides acceleration services for the access request can be determined based on the operator to which the access request belongs.
[0041] In some further embodiments, different first-level CDN vendors provide acceleration services for access requests from the same operator in different regions, or provide acceleration services for access requests from different operators in the same region. For example, vendor B provides acceleration services for access requests from operator M1 in region R1, and vendor C provides acceleration services for access requests from operator M1 in region R2; or, vendor B provides acceleration services for access requests from operator M1 in region R1, and vendor C provides acceleration services for access requests from operator M2 in region R1. Therefore, the target CDN vendor that provides acceleration services for the access request can be jointly determined based on the region to which the access request belongs and the operator to which the access request belongs.
[0042] The region to which the access request belongs can be determined based on the four-tuple in the access request. The four-tuple includes the source IP address, the destination IP address, the source port, and the destination port. The source IP address and the source port are the IP address and the port of the sender of the access request, and the destination IP address and the destination port are the IP address and the port of the receiver of the access request. Different regions usually correspond to different IP addresses. Therefore, the region to which the access request belongs can be determined based on the source IP address.
[0043] In step S13, the DNS server 40 can map the source domain name to the target acceleration domain name corresponding to the target CDN manufacturer. Specifically, the DNS server 40 can obtain the CNAME record corresponding to the source domain name. The DNS server 40 can generate different CNAME records for the same source domain name accelerated by different first-level manufacturers, and different CNAME records include different acceleration domain names. For example, for the domain name a.com accelerated by manufacturer B, the DNS server 40 can generate the following CNAME record: a.com→aBDcom. For the domain name a.com accelerated by manufacturer C, the DNS server 40 can generate the following CNAME record: a.com→aCDcom. In this way, when the target CDN manufacturer is manufacturer B, the DNS server 40 can map the source domain name a.com to the acceleration domain name aBDcom through the CNAME record of manufacturer B. When the target CDN manufacturer is manufacturer C, the DNS server 40 can map the source domain name a.com to the acceleration domain name aCDcom through the CNAME record of manufacturer C.
[0044] In step S14, the DNS server 40 can resolve the target acceleration domain name to the target IP address. Different target acceleration domain names will be resolved to different target IP addresses. For example, continuing with the above example, when the target acceleration domain name is aBDcom, the DNS server 40 will resolve the target domain name to IP1; and when the target acceleration domain name is aCDcom, the DNS server 40 will resolve the target domain name to IP2. Among them, IP1 and IP2 can be different IP addresses of the same CDN server of a secondary CDN manufacturer. In the above manner, although the source domain name accelerated by multiple first-level CDN manufacturers is the same domain name, when the source domain name is provided with acceleration services by different first-level CDN manufacturers, it will eventually be resolved to different target IP addresses, so that the access traffic of different first-level CDN manufacturers can be distinguished according to the target IP address on the same CDN server.
[0045] It should be noted that the CDN server of the present application can be a single server or a server cluster including multiple servers. In the case where the CDN server is a server cluster, each IP address configured to the server cluster can be a virtual IP address (Virtual IP, VIP), which is shared by each server in the server cluster. VIP is a virtual IP address on a server relative to the direct access. Users access the service through this VIP, and the actual request will be distributed to the real server (Real Server) at the back end according to a preset algorithm. There are many ways to implement VIP, such as LVS, OSPF, etc.
[0046] For example, when there are multiple first-level CDN manufacturers including manufacturer B and manufacturer C, assuming that the domain name corresponding to manufacturer B is resolved to IP1 and the domain name corresponding to manufacturer C is resolved to IP2, two VIPs can be configured for each server in the CDN server cluster, namely IP1 and IP2. When the target IP address is IP1, the access request will be assigned to one of the servers whose VIP is IP1. The specific allocation method can be determined according to actual needs, for example, according to the current load or network bandwidth of each server whose VIP is IP1. The processing method when the target IP address is IP1 is similar and will not be repeated here.
[0047] After determining the target IP address, the target IP address can be returned to the client 10, so that the client 10 can send an access request to the corresponding CDN server based on the target IP address. If the CDN server accessed by the client 10 has cached the resources accessed by the access request, the CDN server can directly return the corresponding resources to the client 10, otherwise, it can return to the CDN server of the first-level CDN manufacturer. If the CDN server of the first-level CDN manufacturer has the corresponding resources cached, it can directly return the resources to the CDN server of the second-level CDN manufacturer, and the CDN server of the second-level CDN manufacturer will return the resources to the client 10 and cache them locally; otherwise, the CDN server of the second-level CDN manufacturer will first return to the source server 30, and then return the resources obtained by returning to the source to the CDN server of the first-level CDN manufacturer and cache them locally.
[0048] In some embodiments, the DNS server 40 can write the access record of the target CDN manufacturer into the access log. When an access request accelerated by any first-level CDN manufacturer is assigned to a second-level CDN manufacturer for acceleration, the above-mentioned method can be used to convert the domain name and IP address, send the access request to the CDN server of the second-level CDN manufacturer, and write the access record into the access log. In this way, during subsequent billing, the traffic of each first-level CDN manufacturer can be queried through the access log without confusing the traffic of different first-level CDN manufacturers. In some embodiments, the access record includes identification information of the target CDN manufacturer. The above identification information can be a randomly generated string used to uniquely identify the target CDN manufacturer. Furthermore, the access record can also include but is not limited to at least one of the following: target IP address, access time, and accessed data type.
[0049] In some embodiments, although the same source domain name is accelerated by different first-level CDN manufacturers, the configurations of different first-level CDN manufacturers may be different. The configuration information is used to configure the process of the CDN server processing access requests corresponding to the source domain name. For example, manufacturer B requires that the source header be marked with B, and manufacturer C requires that the source header be marked with C. The CDN server can add different marks to the access traffic from different first-level CDN manufacturers based on the configuration information. For another example, manufacturer B and manufacturer C need to perform access control on different types of access requests. The CDN server can perform access control on different types of access requests based on the configuration information.
[0050] In order to use different configuration information for domain names accelerated by different first-level CDN vendors, the configuration information of the first-level CDN vendor can be stored based on the source domain name and the IP address obtained by resolving the domain name corresponding to the first-level CDN vendor. In this way, after determining the target CDN vendor, the configuration information of the target CDN vendor can be obtained based on the source domain name and the target IP address, and the data requested by the access request can be returned to the client 10 based on the rules configured in the configuration information, thereby using personalized configuration information for different first-level CDN vendors.
[0051] In some embodiments, the configuration information of multiple first-level CDN manufacturers is stored in a mapping table, the key of the mapping table includes the IP address obtained by the accelerated domain name resolution corresponding to the first-level CDN manufacturer and the source domain name, and the value of the mapping table is the configuration information of the first-level CDN manufacturer.
[0052] As shown in Table 1, assuming that the multiple first-level CDN vendors include vendor B and vendor C, as described above, the IP address obtained by resolving the acceleration domain name aBDcom corresponding to vendor B is IP1, and the IP address obtained by resolving the acceleration domain name aCDcom corresponding to vendor C is IP2, then the mapping table includes two records, one of which has a key of IP1 and a.com, and a value of configuration information of vendor B; the other has a key of IP2 and a.com, and a value of configuration information of vendor C. Further, the mapping table may also include the ID of the first-level CDN vendor, and / or the configuration information may include the ID of the first-level CDN vendor.
[0053] Table 1 Mapping table
[0054] After resolving the target acceleration domain name to the target IP address, the record with the source domain name and the target IP address as the key in the mapping table can be determined, and the configuration information of the target CDN manufacturer can be obtained from the record. For example, when the target IP address is IP1, it means that the first-level CDN manufacturer that accelerates the access request is manufacturer B, so what needs to be obtained is the configuration information of manufacturer B. Therefore, a.com and IP1 can be used as keys together, and the value corresponding to the key can be found to obtain the configuration information of manufacturer B.
[0055] The overall process of a specific embodiment of the present application is as follows: (1) Generate different configuration information for domain names that can be accelerated by CDN services provided by multiple first-tier CDN vendors (hereinafter referred to as overlapping domain names), and add the ID of the first-tier CDN vendor to the configuration information.
[0056] (2) First, configure acceleration services for the same domain name for different first-tier CDN vendors. Generate different CNAME records for overlapping domain names of different first-tier CDN vendors. Then resolve different CNAMEs to different IP addresses in the DNS server of the second-tier CDN vendor. For example, the CNAME of vendor B resolves to IP1, and the CNAME of vendor C resolves to IP2. Then configure IP1 and IP2 to the same CDN server. That is, let IP1 serve vendor B, and IP2 serve vendor C.
[0057] (3) Both configuration information are sent to all CDN servers. The CDN servers load the configurations of both vendors into memory at the same time and maintain a mapping table of all domain names in memory. The key of the mapping table is "domain name + IP" and the value is the specific configuration information of the domain name. When a client accesses an overlapping domain name, it finds which configuration information should be used for this access by resolving the domain name in the access request with the target CDN vendor's corresponding accelerated domain name. It processes the access request based on the configuration information, returns the result to the source, and responds.
[0058] (4) When the edge cache service generates logs, it writes the ID and target IP address of the first-tier CDN vendor to which the access traffic belongs into the access logs, and provides them to the billing service for billing using different billing methods.
[0059] like Figure 4 As shown, the present application also provides a CDN acceleration system, the system comprising: The DNS server 40 is used to receive an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can assign the access request to a CDN service provided by a second-level CDN vendor for acceleration, determine a target CDN vendor providing acceleration services for the access request from the multiple first-level CDN vendors, map the source domain name to a target acceleration domain name corresponding to the target CDN vendor, resolve the target acceleration domain name to a target IP address, and return the target IP address to the client; different first-level CDN vendors correspond to different acceleration domain names; and The CDN server 20 is configured with multiple IP addresses including the target IP address, and is used to receive the access request sent by the client based on the target IP address, and accelerate the access request; wherein, among the multiple IP addresses configured by the CDN server, the IP addresses obtained by the accelerated domain name resolution corresponding to different first-level CDN vendors are different IP addresses of the same CDN server.
[0060] Furthermore, the system also includes a configuration platform 50 for configuring the configuration information of the multiple first-level CDN vendors and sending the configuration information to the CDN server so that the CDN server returns the data requested by the access request to the client based on the rules configured by the configuration information.
[0061] A specific embodiment of the present application is as follows: (1) On the configuration platform 50 page, two customer accounts cust1 (the account of manufacturer B) and cust2 (the account of manufacturer C) are used to configure the acceleration domain name a.com respectively, and obtain the CNAME records of manufacturer B, aBDcom and manufacturer C, aCDcom respectively. The two configuration information are added with the ID of manufacturer B and the ID of manufacturer C respectively. The two configurations can be different, for example, the return source of the traffic of manufacturer B carries "cust1", and the return source of the traffic of manufacturer C carries "cust2".
[0062] (2) Resolve the two CNAME records in 1 to two IP addresses respectively, such as aBDcom to 192.168.1.1 (i.e. IP1) and aCDcom to 192.168.1.2 (i.e. IP2). These two IP addresses are located on the same CDN server (referred to as Server A).
[0063] (3) Load two configuration information into the memory on server A, and use the "domain name + IP" method to index these two configurations. Then their indexes in A are a.com_192.168.1.1 and a.com_192.168.1.2. When the client accesses 192.168.1.1 and carries the domain name a.com, it indexes the configuration information of cust1; when the client accesses 192.168.1.2 and carries the domain name a.com, it indexes the configuration information of cust2.
[0064] (5) The generated access log can be used for billing. The log contains two customer account IDs and domain names, and can be used for accurate billing.
[0065] This application has the following technical effects: (1) It solves the problem that the same domain name acceleration cannot be provided to different first-tier CDN vendors in the same or the same group of CDN servers, thereby improving resource utilization.
[0066] (2) It solves the problem that when the same CDN server or the same group of CDN servers provides the same domain name acceleration for different first-tier CDN vendors, it is necessary to distinguish between first-tier CDN vendors and CDN servers when allocating access traffic to CDN servers (i.e., using different CDN servers to serve the access traffic of different first-tier CDN vendors), thereby reducing the complexity of the system.
[0067] (3) It solves the billing problem when the same CDN server provides the same domain name acceleration to different first-tier CDN vendors, reduces the situation where the cost of one first-tier CDN vendor is charged to another first-tier CDN vendor, and improves billing accuracy.
[0068] (4) This solves the problem that when different first-tier CDN vendors have different configuration information, the configuration information of different first-tier CDN vendors needs to be sent to different CDN servers, further reducing the complexity of the system.
[0069] This application also provides a CDN acceleration device, see Figure 5 , the device comprises: The receiving module 301 is used to receive an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can allocate the access request to the CDN service provided by the second-level CDN vendor for acceleration; A determination module 302 is used to determine a target CDN vendor that provides acceleration services for the access request from the multiple first-level CDN vendors; Mapping module 303, used to map the source domain name to the target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; The data return module 304 is used to resolve the target acceleration domain name into a target IP address and return the target IP address to the client, so that the client sends the access request to the CDN server of the secondary CDN manufacturer configured with the target IP address, and then accelerates the access request through the CDN server; the IP addresses obtained by resolving the acceleration domain names corresponding to different primary CDN manufacturers are different IP addresses of the same CDN server.
[0070] The functions or modules included in the device provided in the present application can be used to execute the method described in the above method embodiment. Its specific implementation can refer to the description of the above method embodiment. For the sake of brevity, it will not be repeated here.
[0071] An embodiment of the present application further provides a computer device, which comprises at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the foregoing embodiments is implemented.
[0072] Figure 6 A more specific hardware structure diagram of a computer device provided in an embodiment of the present application is shown, and the device may include: a processor 401, a memory 402, an input / output interface 403, a communication interface 404, and a bus 405. The processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are connected to each other in communication within the device through the bus 405.
[0073] The processor 401 can be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application. The processor 401 can also include a graphics card, which can be a Nvidia titan X graphics card or a 1080Ti graphics card, etc.
[0074] The memory 402 may be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 402 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by a tool or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401.
[0075] The input / output interface 403 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0076] The communication interface 404 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0077] The bus 405 includes a path to transmit information between various components of the device (eg, the processor 401 , the memory 402 , the input / output interface 403 , and the communication interface 404 ).
[0078] It should be noted that, although the above device only shows the processor 401, the memory 402, the input / output interface 403, the communication interface 404 and the bus 405, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.
[0079] An embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any embodiment of the present application when executed by a processor.
[0080] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the foregoing embodiments.
[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computer device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0082] Each embodiment in the present application is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more tools and / or hardware when implementing the embodiment scheme of the present application. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. Those of ordinary skill in the art can understand and implement it without paying creative labor.
[0083] The above is only a specific implementation of the embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiment of the present application. These improvements and modifications should also be regarded as the protection scope of the embodiment of the present application.
Claims
1. A CDN acceleration method, characterized in that: The method comprises: Receiving an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can assign the access request to CDN services provided by secondary CDN vendors for acceleration; Determining a target CDN vendor that provides acceleration services for the access request from among the multiple first-level CDN vendors; Mapping the source domain name to the target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; The target acceleration domain name is resolved into a target IP address, and the target IP address is returned to the client, so that the client sends the access request to the CDN server of the secondary CDN manufacturer that is configured with the target IP address, and then the access request is accelerated by the CDN server; the IP addresses obtained by resolving the acceleration domain names corresponding to different primary CDN manufacturers are different IP addresses of the same CDN server.
2. The method according to claim 1, characterized in that The configuration information of each first-level CDN vendor is stored based on the source domain name and the IP address resolved by the domain name corresponding to the first-level CDN vendor; the method further includes: Acquire configuration information of the target CDN vendor based on the source domain name and the target IP address; The data requested by the access request is returned to the client based on the rules configured by the configuration information.
3. The method according to claim 2, characterized in that The configuration information of the plurality of first-level CDN vendors is stored in a mapping table, the key of the mapping table includes the IP address obtained by the accelerated domain name resolution corresponding to the first-level CDN vendor and the source domain name, and the value of the mapping table is the configuration information of the first-level CDN vendor; The acquiring the configuration information of the target CDN vendor based on the source domain name and the target IP address includes: Determine the record in the mapping table with the source domain name and the target IP address as the key; The configuration information of the target CDN vendor is obtained from the record.
4. The method according to claim 1, characterized in that: Access requests from different regions and / or different operators are accelerated by different first-tier CDN vendors; The step of determining a target CDN vendor providing an acceleration service for the access request from among the plurality of first-level CDN vendors includes: Based on the region to which the access request belongs and / or the operator to which the access request belongs, a target CDN vendor that provides acceleration service for the access request is determined.
5. The method according to claim 1, characterized in that The method further comprises: The access record of the target CDN vendor is written into the access log.
6. The method according to claim 5, characterized in that The access record includes the identification information of the target CDN vendor and the target IP address.
7. The method according to claim 1, characterized in that The CDN server is a server configured with multiple virtual IP addresses, and the multiple virtual IP addresses are IP addresses obtained by resolving accelerated domain names corresponding to the multiple first-level CDN vendors.
8. A CDN acceleration device, characterized in that: The device comprises: A receiving module, used for receiving an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can distribute the access request to CDN services provided by secondary CDN vendors for acceleration; A determination module, configured to determine a target CDN vendor providing acceleration service for the access request from among the plurality of first-level CDN vendors; A mapping module, used to map the source domain name to a target acceleration domain name corresponding to the target CDN vendor; different first-level CDN vendors correspond to different acceleration domain names; A data return module is used to resolve the target acceleration domain name into a target IP address and return the target IP address to the client, so that the client sends the access request to the CDN server of the secondary CDN manufacturer that is configured with the target IP address, and then accelerates the access request through the CDN server; the IP addresses obtained by resolving the acceleration domain names corresponding to different primary CDN manufacturers are different IP addresses of the same CDN server.
9. A CDN acceleration system, characterized in that: The system comprises: A DNS server is used to receive an access request from a client for a source domain name; the access request can be accelerated by CDN services provided by multiple first-level CDN vendors, and the multiple first-level CDN vendors can assign the access request to a CDN service provided by a second-level CDN vendor for acceleration, determine a target CDN vendor providing acceleration services for the access request from the multiple first-level CDN vendors, map the source domain name to a target acceleration domain name corresponding to the target CDN vendor, resolve the target acceleration domain name to a target IP address, and return the target IP address to the client; different first-level CDN vendors correspond to different acceleration domain names; and The CDN server is configured with multiple IP addresses including the target IP address, and is used to receive the access request sent by the client based on the target IP address and accelerate the access request; wherein, among the multiple IP addresses configured by the CDN server, the IP addresses obtained by the accelerated domain name resolution corresponding to different first-level CDN vendors are different IP addresses of the same CDN server.
10. The system according to claim 9, characterized in that The system further comprises: A configuration platform is used to configure the configuration information of the multiple first-level CDN vendors and send the configuration information to the CDN server so that the CDN server returns the data requested by the access request to the client based on the rules configured by the configuration information.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for sending access request
CN102611756A
Domain name determining method and apparatus, and electronic device
CN107888717A
Multi-CDN access management method and device, computer equipment and storage medium
CN110166526A
Method and system for realizing domain name access acceleration
CN110445886A
System and method for quickly introducing external audio-visual content
CN112954384A
Cited By
Resource scheduling method and device, equipment, storage medium and program product
CN121509441A