In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "how to use CDN to achieve application caching and acceleration". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Brief introduction to CDN
The full name of CDN is Content Delivery Network, that is, content delivery network.
CDN is a content distribution network built on top of the network.
CDN users get the content they need nearby, reduce network congestion, and improve user access response speed and hit rate.
CDN relies on edge servers deployed everywhere, including load balancing, content distribution, scheduling and other functional modules of the central platform.
Analyze img.alibaba.com domain name
Execute the dig command and the output is as follows
If it is not installed, execute the following command to install:
Yum install bind-utils
2. Main features of CDN
Local Cache acceleration: improves the access speed of enterprise sites (especially sites with a large number of pictures and static pages), and greatly improves the stability of sites of the above nature.
Mirror service: eliminate the impact caused by the bottleneck of interconnection between different operators, achieve network acceleration across operators, and ensure that users in different networks can get good access quality.
Remote acceleration: remote access users automatically select Cache servers according to CDN load balancing technology, and choose the fastest Cache server to speed up remote access.
Bandwidth optimization: automatically generate the remote Mirror (mirror) Cache server of the server, read data from the Cache server when remote users access, reduce the bandwidth of remote access, share the network traffic, reduce the load of the original site WEB server and other functions.
Cluster anti-attack: the widely distributed CDN nodes and the intelligent redundancy mechanism between nodes can effectively prevent hacker intrusion and reduce the impact of various D.D.o.S attacks on the website, while ensuring a better quality of service.
3. CDN service model
The content Distributor (CDN) is a strategically deployed overall system. It contains three elements.
Distribution service system: the most basic work unit is the Cache device. Cache (Edge Cache) is responsible for responding directly to the access request of the end user and providing the cached local content to the user quickly. At the same time, Cache is also responsible for synchronizing content with the source site, getting updated content and content that is not available locally from the source site and saving it locally.
Load balancing system: the main function is to schedule access to all users who initiate service requests and to determine the final actual access address provided to users. The two-level scheduling system is divided into global load balancing (GSLB) and local load balancing (SLB). According to the principle of user proximity, GSLB determines the physical location of the Cache that provides services to users through the "optimal" judgment of each service node. SLB is mainly responsible for the load balancing of devices within the node.
Operation management system: divided into operation management and network management subsystem, it is responsible for the collection, arrangement and delivery work necessary to interact with external systems at the business level, including customer management, product management, billing management, statistical analysis and other functions.
4. CDN Workflow General WEB request processing process
Users enter the domain name of the website they want to visit in their browser.
The browser requests the resolution of the domain name from the local DNS (domain name resolution server) server.
If the resolution result of this domain name is cached in the local DNS server, the resolution request of the user will be responded directly.
If there is no cache for the resolution result of the domain name in the local DNS server, the resolution is requested recursively to the whole DNS system, and the result is fed back to the browser after getting the reply.
The browser gets the domain name resolution result, which is the IP address of the corresponding service device for the domain name.
The browser requests content from the server.
The server sends the content requested by the user to the browser.
Web request processing flow after the introduction of CDN
When the user clicks on the content URL of the website page, after the local DNS system parses, the DNS system will finally hand over the resolution right of the domain name to the CDN dedicated DNS server pointed to by CNAME.
CDN's DNS server returns the global load balancing device IP address of CDN to the user.
The user initiates a content URL access request to the global load balancer device of CDN.
The CDN global load balancer device selects a regional load balancer device based on the user's IP address and the content URL requested by the user, and allows the user to initiate a request to the device.
The regional load balancing device will provide services for users to choose a suitable cache server.
The user initiates a request to the cache server, and the cache server responds to the user's request and transmits the content needed by the user to the user terminal.
If there is no content that the user wants on the cache server, the server will request the content from its higher-level cache server until the original server that traces back to the site pulls the content locally.
5. Caching algorithm for key technologies of CDN
Cache proxy software: Squid
The cache algorithm determines the hit rate, the pressure on the source server, and the storage capacity of the FTP node.
Distribution capacity
Distribution capabilities depend on IDC capabilities and IDC strategic distribution.
Load balancing
Load balancing software: Nginx
Load balancing (intelligent scheduling) determines the best routing, response time, availability, and quality of service.
Based on DNS
DNS server software: BIND
The DNS-based load balancer uses CNAME to transfer domain names to outsmart the optimal node service.
Cache points include client browser cache and local DNS server cache.
The cached content includes DNS address cache, customer request content cache and dynamic content cache.
Support protocol
Support protocols such as static and dynamic acceleration (picture acceleration, http with certificate acceleration), download acceleration, streaming media acceleration, enterprise application acceleration, mobile application acceleration.
That's all for "how to use CDN to cache and accelerate applications". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.