CN109951567A - A kind of Double Data center applications dispositions method - Google Patents

A kind of Double Data center applications dispositions method Download PDF

Info

Publication number
CN109951567A
CN109951567A CN201910261212.8A CN201910261212A CN109951567A CN 109951567 A CN109951567 A CN 109951567A CN 201910261212 A CN201910261212 A CN 201910261212A CN 109951567 A CN109951567 A CN 109951567A
Authority
CN
China
Prior art keywords
session
application server
data center
memcached
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910261212.8A
Other languages
Chinese (zh)
Inventor
于昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Cloud Information Technology Co Ltd
Original Assignee
Shandong Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Cloud Information Technology Co Ltd filed Critical Shandong Inspur Cloud Information Technology Co Ltd
Priority to CN201910261212.8A priority Critical patent/CN109951567A/en
Publication of CN109951567A publication Critical patent/CN109951567A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The present invention discloses a kind of Double Data center applications dispositions method, it is related to field of cloud computer technology, operation system identical to two data center deployments, two operation systems manage session concentratedly using Memcached, and the application server cluster of two operation systems is shared by Session, realize the unification of session between server node, the service request of user obtains same business service in the operation system of Liang Ge data center, and it is handled in application server cluster by the load deployment of multiple application server nodes, by the way that Session is shared and the processing of business is realized in NAS file-sharing.

Description

A kind of Double Data center applications dispositions method
Technical field
The present invention discloses a kind of Double Data center applications dispositions method, is related to field of cloud computer technology.
Background technique
Dual-active data center, the usually purpose for calamity standby (Disaster Recovery), build 2 (or multiple) Data center.One is primary data center for undertaking the business of user, and one is Backup Data center for backing up master data Data, configuration, the business at center etc..
Session sharing mode:
Session based on NFS is shared.NFS is the abbreviation of Net FileSystem, is earliest to solve by Sun Microsystems Catalogue sharing between Unix network host and research and develop.The realization of this scheme is the simplest, without doing excessive secondary development, it is only necessary to By the local session catalogue of share directory server mount to each channel server, the disadvantage is that NFS relies on complexity Security mechanism and file system, therefore it is concurrent inefficient, particularly with the small documents of this kind of high concurrent read-write of session, Can be excessively high due to the io-wait of share directory server, finally tie down the execution efficiency of front-end WEB application program.
Session based on database is shared.Preferred certainly famous Mysql database, and suggest using Memory table Heap improves the read-write efficiency of session operation.The practicability of this scheme is stronger, using universal, it the shortcomings that It is that the concurrent reading and writing ability of session depends on the performance of Mysql database, while needs oneself to realize that session is eliminated Logic is easy to appear table lock so that timing updates from tables of data, deletes session record when concurrent excessively high.
Session based on Cookie is shared.Still commonplace in large-scale website to be used.Principle is to use whole station Family Session information encryption, serializing after in a manner of Cookie, be uniformly planted in rhizosphere under one's name (such as: .host.com), When accessing all second level domain websites of the rhizosphere under one's name using browser, it can transmit in the corresponding all Cookie of domain name therewith The characteristic of appearance, to realize share and access of the Cookieization Session of user between more services.The advantages of this scheme, is not necessarily to Additional server resource;The disadvantage is that can only store the user of fraction due to being limited by http protocol header confidence length Information, while the Session content of Cookieization needs to carry out safe encryption and decryption (such as: adding solution in plain text using DES, RSA progress It is close;Anti-fake certificate is carried out by MD5, SHA-1 scheduling algorithm again), certain bandwidth resources are in addition occupied, because browser can request The current field under one's name any resource when local Cookie be attached in http be transmitted to server.
The present invention provides a kind of Double Data center applications dispositions method, and the main business application system being related to is in same city two Dual-active is realized at a center dual-active construction, two centers, is same business procedure in the identical deployment in two centers, in the phase of user With obtaining same business service under access request.Liang Ge data center possesses identical, indiscriminate business procedure packet, and It can be disposed by multiple node loads in each center;Application server has to be synchronized using consistency and session information, is adopted It is realized with NAS file-sharing, application cluster/Session centralized system.
Summary of the invention
The present invention is directed to problem of the prior art, provides a kind of Double Data center applications dispositions method, it is intended to for user Business in the identical operation system of two data center deployments, and different data centers simultaneously support business access, When data center delay machine for some reason, business use is not influenced, moreover it is possible to continue to provide business access.
Concrete scheme proposed by the present invention is:
A kind of Double Data center applications dispositions method, operation system identical to two data center deployments, two business System manages session concentratedly using Memcached, and the application server cluster of two operation systems passes through Session is shared, realizes the unification of session between server node,
The service request of user obtains same business service in the operation system of Liang Ge data center, and in application service It is handled in device cluster by the load deployment of multiple application server nodes, is shared by Session and NAS file-sharing is realized The processing of business.
The application server node of application server cluster is replicated in the method, application server cluster it is each A application server node is identical copy in application server cluster, and the application server cluster is deployed to two A data center.
Distributed mirrored volume is created as application program by memory virtual equipment in data center in the method Partitions of file, and the NAS file-sharing provided by NAS gateway by file-sharing to application server node.
Memcached stores the data of session by hash table in the method, different business service Session data are managed concentratedly.
When application server node receives the service request of user in the method, interception filtering is carried out, simultaneously will Session is reoriented to Memcached, and the update operation being timed.
Application server node receives the service request of user in the method, intercepts Http request, judgement It whether there is the Cookie object of specified title in Http request,
SessionId value in Cookie object is then obtained if it exists, and SessionId value and Http request, Http are rung Reply is filtered operation as incoming filter method,
If it does not exist then Cookie object then create with SessionId key assignments Cookie Object Operations, and by this Cookie object is passed to Http response, then incoming filter method is filtered operation.
In the method when application call Session of application server node, application server node is judged In whether there is Session object,
It is searched if there is no then going in Memcached, if there are Session objects to judge whether in Memcached The Session object in Memcached is updated, if Session object is not present in Memcached, creates Session object, And this Session object is saved into Memcahced,
And if so, judging whether Session object updates.
When application program obtains Session every time in the method, before comparing application system current time and Session The time difference of secondary renewal time, if it is greater than the renewal time lower limit of configuration, the Session object just updated.
Usefulness of the present invention is:
The present invention provides a kind of Double Data center applications dispositions method,
Same business procedure obtains same business under the identical access request of user in the identical deployment in two centers Service, and Liang Ge data center possesses identical, indiscriminate business procedure packet, and can be by more in each data center A node load deployment;Application server consistency and session information it is synchronous using NAS file-sharing, application cluster/ Session centralized system is realized.Make the business of user in the identical operation system of two data center deployments, and different Data center supports business access simultaneously, when delay machine is for some reason for a data center, does not influence business use, moreover it is possible to Continue to provide business access.
Detailed description of the invention
Fig. 1 is the data center layouts schematic diagram using the method for the present invention deployment;
Fig. 2 is application server cluster structural schematic diagram;
Fig. 3 is the schematic layout pattern of Memcache and Session;
Fig. 4 application server end intercepts Http and requests flow diagram;
The flow diagram of Fig. 5 application server access Session.
Specific embodiment
The present invention provides a kind of Double Data center applications dispositions method, business system identical to two data center deployments System, two operation systems manage session concentratedly using Memcached, and the application server of two operation systems Cluster is shared by Session, realizes the unification of session between server node,
The service request of user obtains same business service in the operation system of Liang Ge data center, and in application service It is handled in device cluster by the load deployment of multiple application server nodes, is shared by Session and NAS file-sharing is realized The processing of business.
The present invention will be further explained below with reference to the attached drawings and specific examples, so that those skilled in the art can be with It more fully understands the present invention and can be practiced, but illustrated embodiment is not as a limitation of the invention.
Using the method for the present invention in same urban construction Li Liangge data center, one is the general bureau production center, and one is the same as in the production of city The heart, with reference to Fig. 1
Operation system identical to two data center deployments, the application server cluster in operation system is by application service Device forms, and deploys same application program on each server, scalability, application server collection may be implemented by cluster Group provides two kinds of forms of horizontal cluster and vertical cluster, and vertical cluster, which refers to, disposes multiple servers on uniform machinery, sufficiently benefit With hardware resource, and horizontal cluster utilizes more machine resources, and every machine disposes identical application, can according to circumstances select two Kind mode is disposed,
Application server cluster by entire application server, including Enterprise Java Bean container, EJB, Web container, Web module and Servlet is replicated as a cluster, and each cluster member is identical copy in the cluster, and cluster can be located at Identical or different data center.All cluster members of data center are all deployed in virtual machine, can use virtual machine collection The functions such as DRS, HA, DCM that group's system provides provide green, reliably apply deployed environment,
The application server talk application program of application server cluster carries out business processing, and application program provides permission User uploads the user interface in the file that server end is changed or is created, when application program runs on application server cluster When, need synchronization profile, binary file and resource file between cluster member.The present invention uses shared file system It unites and provides network file service by NAS gateway,.Distributed mirror image is created by memory virtual equipment in data center Volume is used as application file subregion, and the network file sharing functionality provided by NAS gateway, such as NFS, CIS), it will be literary Part system shares to application server, all to be all located at the same shared-file system by change or the file updated;
Simultaneously two operation systems manage session concentratedly using Memcached, and two operation systems are answered It is shared by Session with server cluster, realize the unification of session between server node, the present invention uses Memcached Session is stored entirely in the cache server of rear end, with reference to Fig. 3,
Memcached in memory by safeguarding that a unified huge hash table, Memcached can be used to store The data of various formats, the result etc. including image, video, file and database retrieval, using Memcached multiple industry The session centralized management of business service, modifies the session memory mechanism of application server, enables session sequence Change is left concentratedly in memcached, realizes the Distributed sharing of Session,
The HttpServletRequestWrapper decorative kind provided by inheriting Servlet, realization pair The decoration of HttpServletRequest returns the method so as to rewrite getSession () method of former Http request The Session object returned is the Session realized certainly, rather than Session object provided by web container, can be to Session Access do corresponding control, can by session object serialization be stored in backstage Memcached server, and periodically Update, clear operation;And each application server all sets the interception filtering to Http request, application management server Session is reoriented to the Memcached cache server of rear end while Session, and is timed more New operation;Memcached server equally uses the mode of cluster, while reducing Memcached server stress, guarantees The safety of individual server most of data in the case where breaking down;
Wherein application server node receives the service request of user, intercepts Http request, judges in Http request With the presence or absence of the Cookie object of specified title, the title of Cookie object can be provided voluntarily,
SessionId value in Cookie object is then obtained if it exists, and SessionId value and Http request, Http are rung Reply is filtered operation as incoming filter method,
Then Cookie object is worth then with specified title and value and is generally UUID, as SessionId, create if it does not exist Cookie Object Operations with SessionId key assignments, and this Cookie object is passed to Http response, then incoming filter method It is filtered operation, with reference to Fig. 4;
And when the application call Session of application server node, judge to whether there is in application server node Session object,
It is searched if there is no then going in Memcached, if there are Session objects to judge whether in Memcached The Session object in Memcached is updated, if Session object is not present in Memcached, creates Session object, And this Session object is saved into Memcahced,
And if so, judge whether Session object updates,
When application program obtains Session every time, compare application system current time and Session previous renewal time Time difference, if it is greater than the renewal time lower limit of configuration, the Session object of update.
The Session object in Memcached is updated in the present invention, or all by Session object deposit Memcached Can be set a Session object automatic expired time (, it is consistent with the Session expired time of application system, Memcached server can manage the life cycle of Session object obtained, and after expired, client is by nothing Method calls the Session object in Memcached.
Memcache is due to being a internal memory sharing system based on the multi-path asynchronous I/O technology of Libevent in the present invention, Simple Key+Value data model storage makes code logic small and exquisite efficiently, therefore occupies absolutely in oncurrent processing ability To advantage, the expired eliminative mechanism of Expires data specific to the memory hash table of Memcache, just with the mistake of Session Phase mechanism is perfectly in harmony, reduces the code complexity that expired Session data are deleted.
Embodiment described above is only to absolutely prove preferred embodiment that is of the invention and being lifted, protection model of the invention It encloses without being limited thereto.Those skilled in the art's made equivalent substitute or transformation on the basis of the present invention, in the present invention Protection scope within.Protection scope of the present invention is subject to claims.

Claims (8)

1. a kind of Double Data center applications dispositions method, it is characterized in that the identical operation system of two data center deployments, two A operation system manages session concentratedly using Memcached, and the application server cluster of two operation systems is logical It crosses Session to share, realizes the unification of session between server node,
The service request of user obtains same business service in the operation system of Liang Ge data center, and in application server collection It is handled in group by the load deployment of multiple application server nodes, is shared by Session and business is realized in NAS file-sharing Processing.
2. according to the method described in claim 1, it is characterized in that the application server node of application server cluster is replicated, Each application server node of application server cluster is identical copy in application server cluster, by the application Server cluster is deployed to Liang Ge data center.
3. method according to claim 1 or 2, it is characterized in that passing through memory virtual equipment, creation point in data center Cloth mirrored volume as application file subregion, and the NAS file-sharing provided by NAS gateway by file-sharing to application Server node.
4. according to the method described in claim 3, it is characterized in that Memcached by hash table store session data, The session data of different business service are managed concentratedly.
5. according to the method described in claim 4, it is characterized in that when application server node receives the service request of user, into Row intercepts filtering, while Session is reoriented to Memcached, and the update operation being timed.
6. according to the method described in claim 5, intercepting it is characterized in that application server node receives the service request of user It is requested to Http, judges the Cookie object that whether there is specified title in Http request,
SessionId value in Cookie object is then obtained if it exists, by SessionId value and Http request, Http response pair It is filtered operation as being passed to filter method,
Then Cookie object then creates the Cookie Object Operations with SessionId key assignments if it does not exist, and by this Cookie Object is passed to Http response, then incoming filter method is filtered operation.
7. method according to claim 5 or 6, it is characterized in that the application call Session of application server node When, judge to whether there is Session object in application server node,
It is searched if there is no then going in Memcached, if there are Session objects to judge whether to update in Memcached Session object in Memcached creates Session object if Session object is not present in Memcached, and This Session object is saved into Memcahced,
And if so, judging whether Session object updates.
8. according to the method described in claim 7, it is characterized in that comparing application system when application program obtains Session every time The time difference of current time and Session previous renewal time just updates if it is greater than the renewal time lower limit of configuration Session object.
CN201910261212.8A 2019-04-02 2019-04-02 A kind of Double Data center applications dispositions method Pending CN109951567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910261212.8A CN109951567A (en) 2019-04-02 2019-04-02 A kind of Double Data center applications dispositions method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910261212.8A CN109951567A (en) 2019-04-02 2019-04-02 A kind of Double Data center applications dispositions method

Publications (1)

Publication Number Publication Date
CN109951567A true CN109951567A (en) 2019-06-28

Family

ID=67012495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910261212.8A Pending CN109951567A (en) 2019-04-02 2019-04-02 A kind of Double Data center applications dispositions method

Country Status (1)

Country Link
CN (1) CN109951567A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110784539A (en) * 2019-10-29 2020-02-11 深圳供电局有限公司 Data management system and method based on cloud computing
CN111209260A (en) * 2019-12-30 2020-05-29 创新科技术有限公司 NFS cluster based on distributed storage and method for providing NFS service
CN111427608A (en) * 2020-03-20 2020-07-17 重庆富民银行股份有限公司 Gray scale publishing method for bank core system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101258494A (en) * 2005-09-08 2008-09-03 国际商业机器公司 Method and system for improving client-servlet communication
CN103200212A (en) * 2012-01-04 2013-07-10 中国移动通信集团公司 Method and system achieving distributed conversation under cloud computing environment
US20140013367A1 (en) * 2009-08-25 2014-01-09 Sam Elhag System and method for managing multiple live video broadcasts via a public data network on a single viewing channel
CN103685304A (en) * 2013-12-25 2014-03-26 Tcl集团股份有限公司 Method and system for sharing session information
CN104618508A (en) * 2015-02-26 2015-05-13 浪潮电子信息产业股份有限公司 Load balancing mesh architecture based on Nginx, Memcached and Tomcat
CN108063787A (en) * 2017-06-26 2018-05-22 杭州沃趣科技股份有限公司 The method that dual-active framework is realized based on distributed consensus state machine
CN108306928A (en) * 2017-12-22 2018-07-20 努比亚技术有限公司 Session management methods, web server and computer readable storage medium
CN108667892A (en) * 2018-03-07 2018-10-16 长沙开雅电子科技有限公司 A kind of dual-active memory system data volume management method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101258494A (en) * 2005-09-08 2008-09-03 国际商业机器公司 Method and system for improving client-servlet communication
US20140013367A1 (en) * 2009-08-25 2014-01-09 Sam Elhag System and method for managing multiple live video broadcasts via a public data network on a single viewing channel
CN103200212A (en) * 2012-01-04 2013-07-10 中国移动通信集团公司 Method and system achieving distributed conversation under cloud computing environment
CN103685304A (en) * 2013-12-25 2014-03-26 Tcl集团股份有限公司 Method and system for sharing session information
CN104618508A (en) * 2015-02-26 2015-05-13 浪潮电子信息产业股份有限公司 Load balancing mesh architecture based on Nginx, Memcached and Tomcat
CN108063787A (en) * 2017-06-26 2018-05-22 杭州沃趣科技股份有限公司 The method that dual-active framework is realized based on distributed consensus state machine
CN108306928A (en) * 2017-12-22 2018-07-20 努比亚技术有限公司 Session management methods, web server and computer readable storage medium
CN108667892A (en) * 2018-03-07 2018-10-16 长沙开雅电子科技有限公司 A kind of dual-active memory system data volume management method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110784539A (en) * 2019-10-29 2020-02-11 深圳供电局有限公司 Data management system and method based on cloud computing
CN111209260A (en) * 2019-12-30 2020-05-29 创新科技术有限公司 NFS cluster based on distributed storage and method for providing NFS service
CN111427608A (en) * 2020-03-20 2020-07-17 重庆富民银行股份有限公司 Gray scale publishing method for bank core system

Similar Documents

Publication Publication Date Title
US10185497B2 (en) Cluster federation and trust in a cloud environment
AU2016346890B2 (en) Selective synchronization and distributed content item block caching for multi-premises hosting of digital content items
CN106294585B (en) A kind of storage method under cloud computing platform
US11943291B2 (en) Hosted file sync with stateless sync nodes
CN103595730B (en) A kind of ciphertext cloud storage method and system
CN106250270B (en) A kind of data back up method under cloud computing platform
US9405781B2 (en) Virtual multi-cluster clouds
US7543020B2 (en) Distributed client services based on execution of service attributes and data attributes by multiple nodes in resource groups
US10397185B1 (en) Scalable cloud hosted metadata service
CN109995594A (en) Block chain network method for managing resource, device and block catenary system
US20150199414A1 (en) Locally cached file system
US20140259005A1 (en) Systems and methods for managing files in a cloud-based computing environment
US20050216473A1 (en) P2P network system
CN106407214A (en) Distributed storage method and system
CN103180842A (en) Cloud computing system and data synchronization method therefor
CN109951567A (en) A kind of Double Data center applications dispositions method
CN101771723A (en) Data synchronization method
CN102457549A (en) Data synchronization system and method for multiple network storage devices
US9930063B2 (en) Random identifier generation for offline database
WO2019197918A1 (en) Fault-tolerant federated distributed database
KR20130114575A (en) Leader arbitration for provisioning services
CN101778131A (en) Data synchronization system
CN102932443A (en) HDFS (hadoop distributed file system) cluster based distributed cloud storage system
CN101789963A (en) Data synchronization system
CN117395265A (en) IPFS-based enterprise-level distributed hybrid cloud storage system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190628