CN114218330A - ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product - Google Patents

ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product Download PDF

Info

Publication number
CN114218330A
CN114218330A CN202111607341.1A CN202111607341A CN114218330A CN 114218330 A CN114218330 A CN 114218330A CN 202111607341 A CN202111607341 A CN 202111607341A CN 114218330 A CN114218330 A CN 114218330A
Authority
CN
China
Prior art keywords
cluster
data
time
request
selecting
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
CN202111607341.1A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202111607341.1A priority Critical patent/CN114218330A/en
Publication of CN114218330A publication Critical patent/CN114218330A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Abstract

The present disclosure provides a method, an apparatus, a device, a medium and a program product for selecting an ES cluster, which relate to the technical field of big data, and the method for selecting the ES cluster comprises the following steps: acquiring the request time of the previous access corresponding to the access request; respectively acquiring data time periods of data stored in a plurality of ES clusters, and selecting corresponding ES clusters according to the relation between the request time and the data time periods; detecting availability of the selected ES cluster, and redirecting the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable; wherein the peer-to-peer cluster and the ES cluster hold the same data.

Description

ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product
Technical Field
The present disclosure relates to the field of big data technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for selecting an ES cluster.
Background
The elastic search (ES for short) is an excellent real-time distributed storage, search and analysis engine, has perfect ecology and is widely used in enterprise-level application. The following problems are urgently needed to be solved for application services: how is it convenient to manage multiple ES clusters?
In the prior art, under a multi-ES cluster, multiple ES clusters may be organized into a federation cluster using a Tribe node, and an application service only needs to access a single Tribe node. In this mode, the Tribe node broadcasts the request to each cluster, and each cluster needs to execute one time of request no matter whether the target is the Tribe node or not, which causes a great waste of resources. Tribe converts an upstream request into downstream requests, which can be a performance bottleneck as QPS increases. In addition, there cannot be peer-to-peer clusters under the Tribe, otherwise, multiple copies of the same response data are returned for one request. When one cluster in the Tribe is down, failover cannot be automatically performed, and manual processing is needed. Therefore, although the Tribe cluster can simplify the configuration call of the application service, the actual application is not extensive.
Disclosure of Invention
In view of the above problems, the present disclosure provides a method, an apparatus, a device, a medium, and a program product for selecting an ES cluster, which aim to solve the management problem of the ES cluster.
According to a first aspect of the present disclosure, there is provided a method for selecting an ES cluster, comprising the steps of:
acquiring the request time of the previous access corresponding to the access request;
respectively acquiring data time periods of data stored in a plurality of ES clusters, and selecting corresponding ES clusters according to the relation between the request time and the data time periods; and
detecting availability of the selected ES cluster, and redirecting the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
According to an embodiment of the present disclosure, the data time period satisfies the following relationship:
data time period-current time-preset time difference
Wherein, a plurality of ES clusters include in proper order: the hot cluster, the warm cluster and the cold cluster are arranged in a way that the preset time difference is gradually increased from the hot cluster to the cold cluster.
According to an embodiment of the present disclosure, the step of selecting a corresponding ES cluster according to a relationship between the request time and the data time period includes:
sequentially comparing the request time with a plurality of corresponding data time periods from the hot cluster to the cold cluster;
when the request time is less than the data period, the corresponding ES cluster is selected.
According to an embodiment of the present disclosure, the plurality of ES clusters further includes a bottom-of-pocket cluster, and all data is stored in the bottom-of-pocket cluster;
the step of selecting the corresponding ES cluster according to the relationship between the request time and the data time period further includes:
and when the request time is greater than the data time period corresponding to the cold cluster, selecting the bottom cluster.
According to an embodiment of the present disclosure, the step of detecting the availability of the selected ES cluster includes:
sending a health check request to the ES cluster;
when a health response is not received within a first preset time period, then the ES cluster is marked as unavailable.
According to an embodiment of the present disclosure, when a health response is not received within a first preset time period, the step of marking the ES cluster as unavailable further comprises:
when the health response is not received within a second preset time period, the health check request is repeatedly sent;
and the second preset time period is less than the first preset time period.
According to an embodiment of the present disclosure, the method for selecting an ES cluster further includes the steps of:
acquiring current time;
pulling the updating time of the previous updating, and calculating the time difference between the updating time and the current time;
and when the time difference is greater than the preset period, acquiring a configuration information table, and updating the content in the configuration information table to the ES cluster in an incremental pulling mode.
A second aspect of the present disclosure provides an ES cluster selection apparatus, including:
the time module is used for acquiring the request time of the previous access corresponding to the access request;
the cluster selection module is used for respectively acquiring data time periods of data stored in the ES clusters and selecting the corresponding ES clusters according to the relation between the request time and the data time periods; and
an availability detection module to detect availability of the selected ES cluster, and redirect the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a storage device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method for selecting an ES cluster as described above.
The fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method of selecting an ES cluster.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the method of selecting an ES cluster described above.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for selection of an ES cluster according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of selection of an ES cluster according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of cluster selection according to an embodiment of the disclosure;
FIG. 4 schematically shows a schematic diagram of a cluster update according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a design flow diagram of a particular embodiment of a method for selecting an ES cluster according to the present disclosure;
fig. 6 is a block diagram schematically illustrating a structure of a selection apparatus of an ES cluster according to an embodiment of the present disclosure; and
fig. 7 schematically shows a block diagram of an electronic device adapted to implement a selection method of an ES cluster according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated.
In the technical scheme of the disclosure, before the personal information of the user is acquired or collected, the authorization or the consent of the user is acquired.
The present disclosure provides a method for selecting an ES cluster, including the steps of:
acquiring the request time of the previous access corresponding to the access request;
respectively acquiring data time periods of data stored in a plurality of ES clusters, and selecting corresponding ES clusters according to the relation between the request time and the data time periods; and
detecting availability of the selected ES cluster, and redirecting the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
Fig. 1 schematically shows an application scenario diagram of a method and an apparatus for selecting an ES cluster according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario according to this embodiment may include a financial service field. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (for example only) may be installed on the terminal device 101.
The terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 103 may be a server that provides various services, such as a background management server (for example only) that provides support for websites browsed by users using the terminal devices 101. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for selecting the ES cluster provided by the embodiment of the present disclosure may be generally performed by the server 103. Accordingly, the information prompting device provided by the embodiment of the present disclosure may be generally disposed in the server 103. The method for selecting the ES cluster provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103. Accordingly, the information prompting device provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
A method for selecting an ES cluster according to the disclosed embodiment will be described in detail with reference to fig. 2 to 7 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a method of selecting an ES cluster according to an embodiment of the present disclosure.
As shown in fig. 2, the selection method of the ES cluster of this embodiment includes steps S10 to S30, which may be performed by a selection device of the ES cluster.
In operation S10, a request time of a previous access corresponding to the access request is obtained;
in operation S20, data time periods of data stored in the plurality of ES clusters are respectively obtained, and a corresponding ES cluster is selected according to a relationship between the request time and the data time period; and
in operation S30, detecting availability of the selected ES cluster, and redirecting the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
In the technical scheme provided by the disclosure, according to the request time, the ES clusters are preliminarily selected, so that the access request does not need to access each cluster, the target is concentrated in one of the ES clusters, meanwhile, after the ES clusters are obtained, whether the ES clusters are available is detected, the ES clusters can be directly accessed when the ES clusters are available, and when the ES clusters are unavailable, the access request is guided to the peer clusters, so that the ES clusters are suitable for multiple data centers, and the situation that the peer clusters cannot be set or data cannot be correctly obtained from the peer clusters is avoided. In the present disclosure, cluster location is performed first, and then through availability detection, computing resources are saved, while management under set-up peer-to-peer clustering is facilitated.
It should be noted that the peer-to-peer cluster and the ES cluster store the same data, and when designing multiple data centers, the multiple data centers deployed in multiple locations provide services to the outside at the same time, where, in order to ensure the security and accuracy of the data, the data is often stored in the same number in different servers, and in this embodiment, the ES cluster is used conventionally, and the peer-to-peer cluster stores the same data.
Specifically, in the present embodiment, the data period satisfies the following relationship:
data time period-current time-preset time difference
Wherein, a plurality of ES clusters include in proper order: the hot cluster, the warm cluster and the cold cluster are arranged in a way that the preset time difference is gradually increased from the hot cluster to the cold cluster.
The data period indicates how long the ES cluster can hold data, for example, the data period T-1, where T is the current time, that is, indicates that the data period is data that can be held for less than one day.
In this embodiment, by setting the preset time difference, data in different time periods are stored in the multiple ES clusters, the larger the preset time period is, the longer the data can be stored in the data time period, the heat cluster, the warm cluster and the cold cluster are formed by the near ES cluster and the far ES cluster, the query frequency of the data is sequentially reduced, and by setting the heat cluster, the warm cluster and the cold cluster, the response speed of the data is increased, and the data is conveniently located in the cluster including the access request.
It should be noted that the hot cluster is composed of machines with high hardware configuration, and stores and queries high hot-point data, generally, the amount of stored data is small, and the query real-time performance is high; the temperature cluster is composed of machines with medium hardware configuration, and stores data with medium query frequency, generally speaking, the amount of stored data is medium, and the real-time performance of query is medium; the cold cluster is composed of machines with general hardware configuration, the storage and query frequency is lower than that of data, the storage amount of data is large, and the query real-time performance is low.
Further, referring to fig. 3, in order to locate the ES cluster, step S20 includes:
s21, sequentially comparing the request time with a plurality of corresponding data time periods from the hot cluster to the cold cluster;
and S22, when the request time is less than the data time period, selecting the corresponding ES cluster.
By comparing the data time periods from the hot cluster to the cold cluster in sequence, the fastest cluster containing data is found conveniently, for example, when the request time is shorter than the data time period of the hot cluster, that is, the request time is not required to be continuously compared with the warm cluster, the hot cluster is directly requested, the comparison is not required to be continuously performed, the response speed is improved, and the cluster which is responded is ensured to be the smallest and fastest cluster certainly.
Furthermore, since the data in the time period of passage only is not enough to contain all the data, in this embodiment, the plurality of ES clusters further include a bibliographic cluster, and all the data are stored in the bibliographic cluster;
step S20 further includes:
and S23, when the request time is larger than the data time period corresponding to the cold cluster, selecting the bottom cluster.
When the request time is longer than the data time period corresponding to the cold cluster, for example, the cold cluster stores data within one month, and the request time is longer than one month, at this time, no data capable of responding exists in any cluster, at this time, all data are stored in the bottom-of-pocket cluster, and the access request is directed to the bottom-of-pocket cluster, so that the required data can be conveniently inquired, and the data loss and the incapability of inquiry caused by the factor of the data time period are prevented.
On the other hand, it should be noted that there are various ways to check the availability of the ES cluster, for example, the availability flag is manually marked on the ES cluster by a human, and the availability flag is directly checked, in this embodiment, the step S30 includes:
s31, sending a health check request to the ES cluster;
and S32, marking the ES cluster as unavailable when the health response is not received within the first preset time period.
In the embodiment, the health check request is sent and the health response is received, so that the real-time availability check is performed, the machine automatic check is realized, the manual intervention is not needed, and the real-time performance and the accuracy of the machine automatic check are ensured.
Further, in order to improve the accuracy of the usability check, step S32 further includes:
s321, when the health response is not received within a second preset time period, repeatedly sending a health check request;
and the second preset time period is less than the first preset time period.
Therefore, multiple availability checks are performed within the first preset time period to ensure the checking accuracy, multiple checks can be performed within the first preset time period by controlling the second preset time period, and the checking is performed according to requirements without specific limitation.
On the other hand, referring to fig. 4, the method for selecting an ES cluster further includes the following steps:
s01, acquiring the current time;
s02, pulling the updating time of the previous updating, and calculating the time difference between the current time and the updating time;
and S03, when the time difference is larger than the preset period, acquiring the configuration information table, and updating the content in the configuration information table to the ES cluster in an incremental pulling mode.
It should be noted that, in the technical scheme provided by the present disclosure, the period calculation is performed according to the current time and the update time of the previous update, when the time difference is greater than the preset period, it indicates that an update period is reached, at this time, the update content is written into the ES cluster by means of incremental pulling, and online real-time update can be achieved without shutdown and restart.
It should be noted that the incremental pull is to update only the changed content, so as to avoid reloading the unchanged data and improve the efficiency. In addition, in this embodiment, the configuration information table includes a cluster ID, a cluster name, a cluster host, a port, and an update time field.
Referring to fig. 5, a specific embodiment of the present disclosure is provided based on the selection method of the ES cluster.
1. Selecting a cluster through the request time; the method comprises the steps of selecting hot, warm and cold clusters, and selecting through the time difference between request time and data time period to obtain the ID of the clusters.
2. Performing failover (failover) check, that is, detecting availability of a cluster; availability is detected by keepalive, i.e. by sending a signal, detecting whether a signal is sounded in response to it.
Based on the selection method of the ES cluster, the disclosure also provides a selection device of the ES cluster. The apparatus will be described in detail below with reference to fig. 6.
Fig. 6 schematically shows a block diagram of the structure of an abnormal data detecting apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the abnormal data detecting apparatus 200 includes a time obtaining module 1, a cluster selecting module 2, and an availability detecting module 3; the time acquisition module 1 is used for acquiring the request time of the previous access corresponding to the access request; the cluster selection module 2 is used for respectively acquiring data time periods of data stored in a plurality of ES clusters, and selecting corresponding ES clusters according to the relation between the request time and the data time periods; the availability detection module 3 is used for detecting the availability of the selected ES cluster, and redirecting the access request to a peer cluster of the corresponding ES cluster when the ES cluster is marked as unavailable; wherein the peer-to-peer cluster and the ES cluster hold the same data.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
Fig. 6 schematically shows a block diagram of an electronic device suitable for a selection method of an ES cluster according to an embodiment of the present disclosure.
As shown in fig. 6, the electronic device 300 according to the embodiment of the present disclosure includes a processor 3001, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)3002 or a program loaded from a storage section 3008 into a Random Access Memory (RAM) 3003. The processor 3001 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 3001 may also include on-board memory for caching purposes. The processor 3001 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 3003, various programs and data necessary for the operation of the electronic apparatus 300 are stored. The processor 3001, the ROM 3002, and the RAM 3003 are connected to each other by a bus 3004. The processor 3001 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 3002 and/or the RAM 3003. Note that the program may also be stored in one or more memories other than the ROM 3002 and the RAM 3003. The processor 3001 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in one or more memories.
According to an embodiment of the present disclosure, electronic device 300 may also include an input/output (I/O) interface 3005, input/output (I/O) interface 3005 also connected to bus 3004. The electronic device 300 may also include one or more of the following components connected to the I/O interface 3005: an input portion 3006 including a keyboard, a mouse, and the like; an output section 3007 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 3008 including a hard disk and the like; and a communication section 3009 including a network interface card such as a LAN card, a modem, or the like. The communication section 3009 performs communication processing via a network such as the internet. Drivers 3010 are also connected to I/O interface 3005 as needed. A removable medium 3011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 3010 as necessary, so that a computer program read out therefrom is mounted in the storage section 3008 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include one or more memories other than the ROM 3002 and/or the RAM 3003 and/or the ROM 3002 and the RAM 3003 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the selection method of the ES cluster provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 3001. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 3009, and/or installed from the removable medium 3011. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 3009, and/or installed from the removable medium 3011. The computer program performs the above-described functions defined in the system of the embodiment of the present disclosure when executed by the processor 3001. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
The above-mentioned embodiments are intended to illustrate the objects, aspects and advantages of the present disclosure in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present disclosure and are not intended to limit the present disclosure, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (11)

1. A method for selecting an ES cluster, comprising the steps of:
acquiring the request time of the previous access corresponding to the access request;
respectively acquiring data time periods of data stored in a plurality of ES clusters, and selecting corresponding ES clusters according to the relation between the request time and the data time periods; and
detecting availability of the selected ES cluster, and redirecting the access request to a peer cluster corresponding to the ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
2. The ES cluster selection method of claim 1, wherein the data time period satisfies the following relationship:
data time period-current time-preset time difference
Wherein the plurality of ES clusters sequentially include: the temperature control system comprises a hot cluster, a warm cluster and a cold cluster, wherein the hot cluster is connected to the cold cluster, and the preset time difference is gradually increased.
3. The ES cluster selection method of claim 2, wherein the step of selecting a corresponding ES cluster according to the relationship between the request time and the data time period comprises:
comparing the request time with a plurality of corresponding data time periods in sequence from the hot cluster to the cold cluster;
and when the request time is less than the data time period, selecting the corresponding ES cluster.
4. The method of selecting an ES cluster of claim 3, wherein the plurality of ES clusters further comprises a bottom-of-the-pocket cluster, all data stored within the bottom-of-the-pocket cluster;
the step of selecting the corresponding ES cluster according to the relationship between the request time and the data time period further includes:
and when the request time is greater than the data time period corresponding to the cold cluster, selecting the bottom cluster.
5. The method of ES cluster selection of claim 1 wherein the step of detecting availability of the selected ES cluster comprises:
sending a health check request to the ES cluster;
when a health response is not received within a first preset time period, marking the ES cluster as unavailable.
6. The method of ES cluster selection of claim 5 wherein when a health response is not received within a first preset time period, then marking the ES cluster as unavailable further comprises:
when the health response is not received within a second preset time period, the health check request is repeatedly sent;
wherein the second preset time period is less than the first preset time period.
7. The method of selecting an ES cluster of claim 1, further comprising the steps of:
acquiring current time;
pulling the updating time of the previous updating, and calculating the time difference between the updating time and the current time;
and when the time difference is greater than a preset period, acquiring a configuration information table, and updating the content in the configuration information table to the ES cluster in an incremental pulling mode.
8. An apparatus for selecting an ES cluster, comprising:
the time acquisition module is used for acquiring the request time of the previous access corresponding to the access request;
the cluster selection module is used for respectively acquiring data time periods of data stored in a plurality of ES clusters and selecting corresponding ES clusters according to the relation between the request time and the data time periods; and
an availability detection module to detect availability of the selected ES cluster, and redirect the access request to a peer cluster corresponding to the ES cluster when the ES cluster is marked as unavailable;
wherein the peer-to-peer cluster and the ES cluster hold the same data.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.
11. A computer program product, characterized in that it comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202111607341.1A 2021-12-24 2021-12-24 ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product Pending CN114218330A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111607341.1A CN114218330A (en) 2021-12-24 2021-12-24 ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111607341.1A CN114218330A (en) 2021-12-24 2021-12-24 ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product

Publications (1)

Publication Number Publication Date
CN114218330A true CN114218330A (en) 2022-03-22

Family

ID=80705872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111607341.1A Pending CN114218330A (en) 2021-12-24 2021-12-24 ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product

Country Status (1)

Country Link
CN (1) CN114218330A (en)

Similar Documents

Publication Publication Date Title
US20210294864A1 (en) Methods and systems for generating custom content using universal deep linking across web and mobile applications
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN113434241A (en) Page skipping method and device
CN113900834A (en) Data processing method, device, equipment and storage medium based on Internet of things technology
CN113536253A (en) Method, apparatus, device and medium for controlling display authority of page element
US10817281B2 (en) Packaged application resources for mobile applications
CN109981553B (en) Access control method, system thereof, computer system, and readable storage medium
CN112882895A (en) Health examination method, device, computer system and readable storage medium
CN111783005A (en) Method, apparatus and system for displaying web page, computer system and medium
US10372610B2 (en) Prefetching data for application usage
CN113132400B (en) Business processing method, device, computer system and storage medium
CN114218330A (en) ES cluster selection method, ES cluster selection device, ES cluster selection apparatus, ES cluster selection medium, and program product
US10831538B2 (en) Optimized management of application resources for mobile applications
US10659560B2 (en) Mobile device display preference
CN113326079A (en) Service version switching method, switching device, electronic equipment and storage medium
CN114285743B (en) Method, device, electronic equipment and storage medium for updating configuration information
CN114745316B (en) Routing method, device, equipment and medium
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN114218160A (en) Log processing method and device, electronic equipment and medium
CN114338697A (en) Method and device for providing shared cloud service, electronic equipment and storage medium
CN115421873A (en) Dictionary construction method, and file evaluation method, device and equipment based on dictionary
CN113660166A (en) Transaction routing control method and device, electronic equipment and storage medium
CN114461527A (en) Test item management method, test item management apparatus, test item management device, storage medium, and program product
CN113419922A (en) Method and device for processing batch job running data of host
CN113760899A (en) Data table change control method and device, electronic equipment and readable storage medium

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