In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces CDN with OSS how to build a dynamic and static separation application architecture, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
In the traditional website product application architecture, all resources are deployed in the data storage area locally stored or mounted on the application server, and there is no separation of dynamic and static resources. The product architecture is shown below:
There are many problems with this architecture:
System performance will be limited or even encounter bottlenecks with the growth of system traffic.
When there is a large amount of static resource visits, it occupies the exit bandwidth and affects the dynamic request response.
When user requests are dispersed, the distance from origin to origin is long, which affects the user experience (pull back to origin is still required when using CDN only).
Second, CDN+OSS architecture scheme:
The architecture makes full use of the characteristics of "low bandwidth / traffic cost, independent response and unlimited storage space of OSS", combined with CDN distribution network, realizes the separation of resources and supports mass user access.
The optimized product architecture is shown in the following figure:
1. Applicable scenarios
Large storage capacity of static files, large number of files, large file size, and insufficient storage space on the server.
The amount of static file access is large, which takes up bandwidth load or server load, and the problem of Imax O causes users to access stutters.
The distribution of subscribers is relatively scattered, distributed in all parts of the country and operators.
The requirement of file download speed is high, and the concurrent download quantity is high.
2. Architecture description involves product introduction:
Object Storage Service (OSS:Object Storage Service) is a large-scale distributed object storage service independently developed by JD.com Cloud, which provides cloud storage services with high availability, low cost and strong security for enterprise and individual developers. You can achieve unified management of data to meet all kinds of storage needs. Support the standard RESTfulAPI interface, you only need to pay according to the actual usage, there is no minimum use limit. Streaming write and file writing are supported. In the face of cold data storage scenarios, for those data with low access frequency and low access speed, the data can be stored in the way of low-frequency access, which provides a massive and low-cost space for you to save and back up data.
Jingdongyun CDN (Content Delivery Network), based on JD.com 's high-quality network infrastructure and intelligent cloud computing technology, provides users with low-cost, high-performance and scalable Internet content distribution services. Make use of extensive node coverage and advanced cloud scheduling and cloud storage technology to deliver massive content to Internet end-users faster and more reliably, reduce website operating costs and enhance users' Internet application experience. The predecessor of Jing Dong Yun CDN is a self-built CDN platform serving JD.com Mall. After years of business promotion activities such as 618,11.11, JD.com Cloud 600 + nodes widely cover various regions and operators across the country, selecting high-quality infrastructure of the whole network, and edge nodes cover the whole network and the whole region, truly realizing local connection and push.
Use JD.com Cloud's object storage and CDN services together, and use the network-wide CDN acceleration node built by JD.com to provide you with two-way acceleration of uploads and downloads to achieve network-wide coverage and fast and efficient content distribution.
Architectural advantages:
Reduce Web/ application server load and transfer static resource response pressure to CDN to avoid performance impact
The cost is the lowest, and the storage cost of OSS is much lower than that of CVM disk.
Large capacity storage space, large bandwidth upload channel, no need to worry about the upper limit of storage space
Reduce the traffic fee. Under normal access conditions, the back-to-origin traffic is reduced by 95% compared with direct access to OSS.
III. Actual cases
Take a common Web site as an example. Www.abc.com is a news portal, with 500GB news pictures, news videos, JS files and other static content, using the LAMP architecture, the site's full architecture is deployed on JD.com Cloud. With the development of user business and the continuous growth of visits, many users report that the speed of visiting the website is getting slower and slower, the loading of pictures and videos is slow, the stutter rate is high, and the response of the website is slow. The customer engineer found that more and more pictures were uploaded by users, the peak bandwidth was very high during the peak period of business, and the server Ipicuro was often occupied.
For the above cases, we can use the OSS+CDN architecture introduced above to optimize the website, achieve the product architecture of dynamic and static separation, enhance the user access experience, and the cost can be controlled.
The solution and steps are as follows:
1. Sort out the application architecture of the website, distinguish the dynamic program part from the static part and manage them in different directories, establish image, video and js directories, and place all the website picture materials respectively.
2. Enter the OSS product in JD.com Cloud console and create a new Bucket. Select the region where the bucket resides according to the region where the CVM resides, and select "Public read" as the permission. The bucket name corresponds to the name of the directory created by the CVM, such as "abc-image-bucket", "abc-video-bucket" and "abc-js-bucket".
3. Bind the domain names image.abc.com, video.abc.com and js.abc.com respectively and accelerate the CDN.
4. Upload files: console upload and form upload are provided.
Console upload: files smaller than 1GB can be uploaded through the COS console. If the file you want to upload is larger than 1GB, please upload it through object storage API or SDK.
Form upload: form upload means that the user uses the Post Object request in OSS API to upload the file, which is very suitable for embedding in the HTML page to upload the file.
5. Modify the DNS schedule, add CNAME resolution, and schedule the original request for access to the origin server to the CDN accelerated domain name. After that, all the static files that users visit your website will be accessed through OSS+CDN, which will no longer occupy the resources of your CVM.
4. Typical application scenarios
News portal
Application distribution market
Online music, online singing
Video, short video (UGC/PGC)
Cinema line
Online education
About CDN with OSS how to build dynamic and static separation of the application architecture is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.