Game to the flexible expansion of the server demand-game cloud Series A
Objective
Cloud computing from a few years ago the concept of speculation to today a variety of public and private development of the cloud, more and more users began to contact and try to cloud as the carrier of business operations, there are many daring to taste the user experience of the cloud computing flexibility and cost advantages. I myself also from the initial vague understanding of the cloud to the early adopters, to large-scale use of cloud platform, there are many feelings, cloud computing technology and platform is also in the gradual improvement and stability, so put some ideas for reference, but also want to discuss with you how to use cloud computing technology to better improve the game development and operation Quality.
For the gaming industry, private cloud due to its closed and currently does not have a mature standardized program, in addition to individual tall on the end of the development or operators may be used, for most gaming companies do not apply, put aside the cost and technical threshold does not speak, on the current internet age of the game industry rich and changeable characteristics, Private clouds have great limitations. In fact, regardless of cloud, at the bottom of the technology is similar, but due to the domestic data center and Network policy restrictions, but also led to the limitations of the private cloud. This series will explore the characteristics of cloud computing technology, especially the public cloud platform, and some technical architectures from various perspectives such as development to operation and maintenance. Welcome everyone to enthusiastically discuss, sharing the game field of cloud technology experience!
One of the game clouds: elastic expansion
When it comes to cloud computing, the two most common points you hear are: 1. Cost Advantage 2. Flexible or elastic extension.
The cost problem involves a lot more, we don't discuss it for the time being, let's talk about the flexibility of the cloud (elastic expansion). So what is elastic expansion? It's kind of like when we use tap water, we use as much as we can, and we pay by the amount we use, not like before, we calculate the number of drafts and then plan to dig a few wells. For game development and operation, cloud computing is like tap water, in the different stages of the game lifecycle for the network, computing, storage and other resource needs are not the same and frequent changes. In the end-travel era, these can be accurately estimated based on experience, including user-volume curves can be predicted, but in the mobile internet age? The characteristics of the game domain are: rapid development, a large number of user outbreaks, short life cycle.
For example, last year's popular crazy guessing game, just on the line to the trend of crazy spread, the number of new users per day more than 300,000, the user volume of the outbreak is unpredictable. But now many games development time is also very short, especially the page swims, hand tour and so on, short a few weeks, long also but a few months, due to the characteristics of domestic players and games, and other factors, many of the game's life cycle is basically about 1-2 years, the user volume of the outbreak is basically the first time in the game market, So the entire game IT system architecture is from the sudden explosion to smooth and gradually reduced.
Think about the traditional approach to cloud computing, we have to do the user forecast first, and then estimate the online user volume and it resource consumption, as the game to promote the advertising, the number of users increased rapidly to 1 million, no problem, because two months ago we have the game server deployed. However, the mobile internet age of the number of game users prediction is difficult, in addition to the game itself, many external factors will also have a greater impact on the number of users, such as fashion trends, national policies, public events. such as the previous popular Flappy Bird game, development I think no one will think of this game will be fire to bursting, but fortunately this is just a stand-alone game, if it is online games, then the traditional pre-deployment server approach may face the situation is, or the number of users is not enough to cause IT resources idle, Either a surge in the number of users has caused the server to run at full capacity for a short time (one or two weeks) even if the game is running fast, go to purchase, order, deploy, debug, at least two weeks elapsed, and these two weeks is the key to determine the fate of the game, in the two weeks of any downtime, Events such as access delays can cause users to lose and never come back.
What about cloud computing?
In the development phase, just buy a few sufficient low configuration cloud host can; in the beta and the public testing phase, according to the cloud host load appropriate to add new servers; in the game online promotion phase, you can at any time according to the growth of the number of users and server load at any time to deploy resources, according to the surge of user volume, on-demand expansion of the machine , and in the second half of the game lifecycle, with the user's decline, gradually shut down some cloud host, to ensure that the cloud host in use has been kept busy, and even can do at the peak of the game such as Night 7-12, or city war, such as large access time period, increase cloud host or bandwidth, Reduce the amount of resources in a time period with low access.
Isn't that a good idea? Really good, but, hardware or virtual IT resources can be flexible expansion, how the game software itself to achieve flexible expansion? How can you guarantee that after adding the server, game software can also be expanded, and the expansion must be online, the existing system can not have any impact?
The development of distributed game software architecture is a way, but the technical threshold is too high, and want to do a stable and perfect or need not small input.
Because the logic of the game program is the same, whether the partition or the division, but the data is different. So the most common practice now is to use load balancing devices to achieve flexible expansion. What does load balancing do? is to show the same IP or access to the outside, in fact, the corresponding multiple servers. Load-balancing devices have so many functions: 1. Poll the server's load on the backend, distributing the request to a reasonable server, ensuring that the server's load is on average 2. Ensure business continuity, when one or several servers fail, the request is only forwarded to a healthy server, which can also be used to avoid a single point of failure of the game server or to implement disaster preparedness.
So how to achieve load balance, you can use the open source software to achieve their own, if the use of cloud services, then foreign countries such as Amazon's Elb, such as Aliyun SLB, and so on, interested in Google can.
With load balancing, there is a flexible expansion of the foundation, since the load-balanced game server are equivalent, then, in the case of increased access, installed a new game server, add it to the load balancing device, the entire system seamless expansion. Then there are alumni asked, installation configuration does not seem so easy, if it is a traditional physical server, indeed, at least need a CD-ROM installed it, if it is a cloud host? You can have mirrors, the so-called mirror image is a bit like the ISO or virtual machine on the PC VMDK files, the original game server system, software, configuration of the whole to do a mirror, in addition to the new cloud host, directly from the mirror creation, without any installation configuration process, the new game Server minutes on the start, if through the API operation, calculate the start time, the whole process within 10 minutes can be done, is not very soon? And as the cloud computing platform is perfected, flexible expansion will also become a service, that is, you only need to set the policy, such as all server load more than 90% new server, when the server load less than 60%, the release cloud host, the entire system becomes very flexible, no longer to the sudden increase in the number of users to worry about.
Maybe there will be students asked, load-balanced game server does solve the computational level of elasticity, then how the data, if my data capacity or access bottlenecks how to stretch? Speaking of data, we first talk about the storage of the problem, cloud storage has long been familiar with, the storage of the cloud is relatively easy to do, so the storage layer of virtualization has been completed, many cloud storage claims unlimited space, of course, storage speed is also a very important factor. So what about the database, how to avoid the bottleneck caused by a single database server, familiar with the MySQL students should be aware of the sub-database, in the large-scale data and access to the database, according to a certain rule of the database pressure allocation to a number of database instances, such as by user ID and so on, a lot of similar information online, At present, the work of the sub-Library is still in need of planning. It is understood that some cloud platforms are ready to launch a distributed database services, that is, the external (application layer) to see a database, in fact, the bottom of the corresponding multiple database instances. Sub-Library, load allocation and so on are automatically completed by the cloud system. If this service is launched, the data level of flexibility will become very easy, only the amount of game data or the number of visits to automatically adjust the size of the database, which will become very flexible and smart. This feature will be very exciting, so let's see which cloud platform is the first to launch this distributed database service.
Let's talk a little more about bandwidth (further discussion), many game operations are plagued by bandwidth, for many games bandwidth is the most important. Since it is a cloud, the flexibility of the bandwidth increase is essential, and the cloud platform through the API can immediately adjust the bandwidth, which than the IDC hosted or built server bandwidth to expand the convenience of too much, the cloud platform bandwidth can be completely free control, or even automation.
The big head this game everybody knows, the user quantity and the income in the industry is far ahead, can say this game's success is inseparable from to the cloud Platform's utilization, IS has the cloud computing all sorts of elasticity, can respond well to the user quantity the proliferation, simultaneously the system stability also obtains the guarantee. Another small example is the use of Game Update server, the update server is only needed when the game is released for upgrade packs, and will have a very large amount of traffic when the upgrade package is released, if there is only one update server and the pressure on the client update is too high and the user experience gets worse, then when the upgrade package is released, On the cloud Platform for temporary deployment of more than one update server, such as 5, as the user upgrade completed, and then shut down the update server one by one, these through the flexible expansion of the cloud platform is very convenient to achieve.
Therefore, from the game development, promotion, stabilizer, decline and other stages, the cloud platform can be as open as tap water, on demand, according to the amount of expenses paid. And can also ensure that the game development and operation of the various stages of efficiency and resource utilization can be greatly improved.
Original Author: Architecture Cloud Shoke article from: http://game.aliyun.com forwarding please indicate the source