当前位置:网站首页>Cos+cdn realizes the distribution of game client version files in a faster, better and cheaper manner

Cos+cdn realizes the distribution of game client version files in a faster, better and cheaper manner

2022-06-24 04:59:00 Yunyanjun

In the daily operation of the game , Each release requires players to update the version when they start the client 、 Parameter file 、 And updated content . Some files cannot be cached because of logic , Once requested , Players must get the latest version . In the past, we used to use more than one Nginx The server reads static files , Add a set of load balancing to share client download requests .

In fact, after the cloud , Use content distribution networks (Content Delivery Network,CDN) Speed up object storage (Cloud Object Storage,COS), The contents in the storage bucket can be downloaded in a wide range 、 distribution ; For each new version patchlist file , You can configure non caching rules , Ensure that players return to the source every time they visit , Maintain the latest version . With the source authentication function , Content can only be downloaded by legitimate users , Avoid data security and traffic costs that may be caused by open download .

As shown in the figure below , Let the players pass CDN Speed up reading . The configuration method is very simple , There are two steps :

1. Put the registered game domain name ( National service must be selected , Overseas options ), Point to the origin COS bucket , You can use a custom domain name to accelerate access to objects in the bucket

2. stay “ Node cache configuration ” On , take patchlist File is set to not cache

There are many advantages to using this scheme :

1. Better cost : Object storage is not only cheap , And pay for the actual storage , Not for file servers CPU、 Memory 、 Reserve storage space for payment . If only store 1G The file of , Each month, traditional two servers need 100 element , and COS It only needs 1 dime ( Chengdu, for example ), The cost is only the former 1/1000, Rounding off is like no money .

2. Higher reliability : Built in redundancy , Object storage comes with multiple copies , And stored in multiple machine rooms in the same region , Ensure the stability of users . You can also configure remote disaster recovery on demand , Provide more than... For your data 10 individual 9 The reliability of the .

3. Zero operations : Multiple file servers need to be managed by operation and maintenance personnel , Installation and deployment Nginx, Consider server renewal 、 Anti attack 、 monitor 、 Call the police ...... and COS Use out of the box to eliminate these unnecessary O & M costs .

4. Easy integration : It's very convenient and convenient CDN Integrate , The console can be configured through CDN Distribute documents worldwide CDN node , Let players optimize the download , Load whooshing .

5. Higher security :COS You can set read and write permissions for each file , It comes with encryption 、 Release the theft chain 、 Speed limit, etc. to block access from malicious sources , prevent Ddos and CC Attack, etc .

6. Seamlessly connect other cloud components : Provide a variety of easy-to-use tools , It can be processed with pictures 、 Seamless connection of content audit and other functions , Or with cloud functions SCF Combine to realize automatic processing . Provide multiple languages SDK, Convenient and efficient .

So many benefits , Brother dei Are you sure you don't want to do it ?

原网站

版权声明
本文为[Yunyanjun]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/08/20210829013944323t.html