License authentication system
Technical field
The present invention relates to a kind of license authentication system, relate in particular to a kind of towards numerous users, the license authentication system that need authenticate in a large number simultaneously.
Background technology
Be disclosed on 03 02nd, 2005, publication number is CN1588850A, name is called in the application for a patent for invention file of " a kind of method for network authorization and system ", following a kind of Verification System is disclosed: except that comprising the network terminal, the webserver be connected link outside, also comprise the authentication management server, can realize when the webserver is landed in network terminal request by this system configuration, by third party's authentication management server the network terminal is authenticated, and by the authentication management server to webserver return authentication results messages, the webserver is with authentication result message informing network terminal.But this scheme can't solve the immense pressure owing to the soaring rapidly required user log-in authentication that bears of the webserver that brings of number of network users, causes the network congestion phenomenon more and more serious easily.For example, for certain comparatively popular online game, usually will receive a hundreds of thousands authentication request in one minute, authentication pressure is very huge.Therefore,, how can on the basis of legacy network framework, develop for Virtual network operator, with reduce immense pressure that each webserver born become essential.
Summary of the invention
Technical problem to be solved by this invention provides a kind of license authentication system, can solve owing to problems such as the soaring rapidly user log-in authentication pressure that brings of the network user are huge, and can be on the basis of legacy network framework, realization distributes user's authentication request according to the actual conditions of calling party amount in each station server, balanced authentication pressure, improve the efficient and the reliability of authentication, save cost simultaneously.
For solving the problems of the technologies described above, the invention provides a kind of license authentication system, comprising: Login Register layer, application service layer and Database Systems layer three-tier architecture;
Described Login Register layer is realized by many logon servers, and SDK all is housed on every logon server, and being used for provides the operation strategy according to the customer traffic situation of reality;
Described application service layer comprises: many certificate servers, a monitoring server and one or more distribution server; Wherein, described certificate server is used for user's log-on message is authenticated; Described monitoring server is used for user's authentication request is added up and calculated, and judges current pressure condition; Described distribution server, be used to receive from monitoring server show the excessive signal of pressure after, SDK in logon server sends the interruptive command that transmission channel is redistributed in request, SDK is after receiving described interruptive command, redistribute transmission channel for each authentication request, make each authentication request can send to different certificate servers and authenticate;
Described Database Systems comprise: authentication database and sync database; Wherein, described authentication database adopts master/slave pattern, is divided into master data base and from database; Master data base is used to carry out " writing " operation; Be used to carry out " reading " operation from database; Described sync database and each master and slave database Y-connection are used for being recorded in each master data base and from the daily record of each step operation that database carried out together, realize between master and slave database synchronously.
The present invention has such beneficial effect owing to adopted technique scheme, promptly by use SDK (SDK) in logon server (Login Server), has realized and can formulate certification policy according to various concrete situations; By cooperatively interacting of monitoring server (Monitor Server), distribution server (DispatchSvr) and SDK, realized the user log-in authentication request is distributed according to the actual pressure situation; Simultaneously by authentication database is divided into the master data base (MasterDB) that is specifically designed to " writing ", be specifically designed to " reading " from database (SlaveDB) and with described each master and slave database Y-connection sync database (Sync) together, alleviated when authenticating, owing to the huge pressure that causes of verify data amount; Therefore license authentication system of the present invention has been realized the purpose of balanced authentication pressure, and owing to can develop on the basis of original Verification System, has therefore been saved exploitation and realized cost, is easy to simultaneously realize.
Description of drawings
The present invention is further detailed explanation below in conjunction with accompanying drawing and embodiment:
Accompanying drawing is the system architecture diagram of an embodiment of system of the present invention.
Embodiment
Be the system architecture diagram of an embodiment of license authentication system of the present invention as shown in drawings, be three-tier architecture, ground floor is the Login Register layer, and the second layer is an application service layer, and the 3rd layer is the Database Systems layer, and these three layers link together by transfer bus.
The Login Register layer of ground floor is realized by many logon servers (Login Server), wherein on every logon server SDK (SDK) is housed all, be used for providing various operation strategies according to the customer traffic situation of reality, as masking operation is set, for example system is set to per minute and shields 10 inferior; When connecting network appearance broken string, system is switched to local authentication, thereby guaranteed the reliability that system passes through and authenticates; When occurring having the situation of a large amount of authentication request, distribute transmission channel for each authentication request, promptly determine to finish the authentication of user login information, thereby realize the equilibrium of load pressure by which platform certificate server.
The application service layer of the second layer comprises many certificate servers (AccountSvr), a monitoring server (Monitor Server) and one or more distribution server (DispatchSvr).Wherein, the log-on message (as username and password etc.) that is used for the user of certificate server authenticates; Monitoring server is used for user's authentication request is added up and calculated, and judges current pressure condition; When authentication request surpasses certain quantity when (as surpassing 50,000 authentication request in one minute), described monitoring server can send signal to distribution server, shows that load pressure is excessive.Distribution server receive from monitoring server show the excessive signal of pressure after, SDK in logon server is sent interruptive command, SDK is after receiving described interruptive command, to redistribute transmission channel for above-mentioned authentication request, make each authentication request can send to different certificate servers and authenticate, thereby realized isostasy.
The 3rd layer Database Systems layer is preserved all users' log-on message (as user name, password etc.).In the present invention, described Database Systems layer comprises authentication database and sync database two parts, and because the user's registration information amount and the quantity that need authenticate huge, therefore, described authentication database adopts master/slave (Master/Slave) pattern, promptly is divided into main (Master) database and from (Slave) database.Master data base is used for user profile is carried out " writing " operation, and all business such as the modification of user to log-on message, authentication promptly are provided; Because the operation that user profile is carried out " writing " can be concentrated and be carried out, and therefore can adopt two master data base to finish " writing " operation of all user profile in one embodiment.Be used to carry out " reading " operation from database, the business of inquiry classes such as the authentication of user to log-on message, data check promptly is provided; Because " reading " operation is what the request timesharing according to different user took place, therefore in order to alleviate the pressure that may cause, can adopt 8 in one embodiment from database.Sync database and each master data base be in the same place from the database Y-connection, can be recorded in each master data base and the daily record of each step operation of from database, being carried out by this sync database, therefore when the data in the master data base after user's modification changes (promptly having carried out new operation), according to the Operation Log that writes down in this sync database, same operating in all reformed from database one time, thus realized between master and slave database synchronously.The synchronization job of sync database is according to the setting that realizes, carries out once every certain cycle.Come the synchronous method of fulfillment database by each data in the sync database among the SQL Server with respect to current Microsoft commonly used, because the present invention is by synchronous " operation ", promptly synchronously the mode of " behavior " realizes synchronous between master and slave database, therefore comparatively speaking, database synchronization efficient of the present invention, accuracy and reliability are higher.In addition, the present invention is by the authentication database of master/slave pattern, also can strengthen safety and system's robustness of data, when master data base goes wrong (as the media damage such as disk of preserving data, loss of data, connection fault etc.), can will upgrade to master data base fast, thereby the integrality of data and normally providing of systemic-function have been provided from database.
As mentioned above, be master/slave pattern because authentication database adopts in the present invention, so the certificate server in the application service layer is divided into following three kinds of operational modes: promptly lead (Master) pattern, from (Slave) pattern and pure from (Slave) pattern.When certificate server runs on holotype, only be used to realize user's " writing " operation to master data base, all business such as the modification of user to log-on message, authentication promptly are provided; When certificate server runs on purely during from pattern, only be used to realize that the user to " reading " operation from database, promptly provides the business of inquiry classes such as the authentication of user to log-on message, data check; And when certificate server runs on from pattern, both can be used for realizing user's " writing " operation to master data base, can realize again " reading " operation from database.