CN107222567A - Method, device and the service cluster of processing data request - Google Patents
Method, device and the service cluster of processing data request Download PDFInfo
- Publication number
- CN107222567A CN107222567A CN201710552124.4A CN201710552124A CN107222567A CN 107222567 A CN107222567 A CN 107222567A CN 201710552124 A CN201710552124 A CN 201710552124A CN 107222567 A CN107222567 A CN 107222567A
- Authority
- CN
- China
- Prior art keywords
- request
- http
- data
- access information
- downgrade
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请涉及处理数据请求的方法、装置及服务集群,方法包括:HTTP和反向代理服务器接收客户端的HTTP访问请求,根据所述HTTP访问请求获取访问信息,向服务集群发送包含所述访问信息的数据请求;所述服务集群用于获取包含访问信息的数据请求,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。本申请的技术方案能够实现后台服务动态降级,能够根据流量和服务器情况灵活配置。
The present application relates to a method, device and service cluster for processing data requests. The method includes: HTTP and a reverse proxy server receive an HTTP access request from a client, obtain access information according to the HTTP access request, and send a message containing the access information to the service cluster. Data request; the service cluster is used to obtain a data request containing access information, and determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch, and if downgrade is required, obtain the request result from the pocket cache, If downgrading is not required, real-time data is obtained according to the data request. The technical solution of the present application can realize dynamic degradation of background services, and can be flexibly configured according to traffic and server conditions.
Description
技术领域technical field
本申请涉及计算机应用技术领域,具体而言,涉及处理数据请求的方法、装置及服务集群。The present application relates to the field of computer application technology, in particular, to a method, device and service cluster for processing data requests.
背景技术Background technique
随着互联网的逐渐发展,上网的成本和门槛变的越来越低,网站的流量随之快速的增长,网站的服务器经常会遇到在某天的某个时刻流量突然增大的情况例如在秒杀开始前一刻,突然增大的流量会导致后台服务器处理不及时,部分请求用户会出现超时或者失败等情况,无法成功获取数据会导致页面上出现空白一片的情况,严重影响用户体验。如果不及时降低服务器的压力,甚至会造成整个接口挂掉,所有的用户请求失败的严重事故。With the gradual development of the Internet, the cost and threshold of accessing the Internet have become lower and lower, and the traffic of the website has increased rapidly. The server of the website often encounters a situation where the traffic suddenly increases at a certain time of the day. For example, in Just before the seckill starts, the sudden increase in traffic will cause the background server to not process in time, and some requesting users will timeout or fail. Failure to successfully obtain data will cause a blank page to appear on the page, which seriously affects the user experience. If the pressure on the server is not reduced in time, it may even cause the entire interface to hang up and all user requests to fail in a serious accident.
一种相关技术是通过增加服务器机器数量来提高后台的处理能力。但是流量峰值通常都是在特定的时候和特定的场景下出现,如果按照最大流量的标准配置服务器,会导致平时大量服务器的闲置。A related technique is to increase the background processing capacity by increasing the number of server machines. However, traffic peaks usually occur at specific times and in specific scenarios. If servers are configured according to the maximum traffic standard, a large number of servers will be idle at ordinary times.
还有一种相关技术是通常是在后台缓存一份兜底数据,然后在redis(是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库)等缓存中设置一个开关,服务器每隔一段时间去获取一下开关,管理员一旦发现流量超过阈值后打开降级开关,所有用户的请求直接返回兜底数据,不再进行后台的逻辑处理,降低对服务器的压力。但是,这种方案是将降级开关放在缓存中,每隔一段时间去获取一次缓存,因此开关为开标识之后需要隔一段时间才能生效,其次,一旦开关为开标识之后,所有的用户都只能得到兜底数据,不能根据流量和服务器情况灵活配置。另外,如果后台服务挂了,用户仍然可能获取不到数据,出现空白页面的情况,因此降级不实时,不够灵活,可靠性也不高。There is also a related technology that usually caches a piece of data in the background, and then stores it in redis (an open source, log-type, Key-Value database written in ANSI C language, supports the network, can be based on memory or can be persisted), etc. Set a switch in the cache, and the server will obtain the switch every once in a while. Once the administrator finds that the traffic exceeds the threshold, he will turn on the downgrade switch. All user requests will directly return the bottom data, and no background logic processing will be performed, reducing the pressure on the server. . However, this solution is to put the downgrade switch in the cache and get the cache every once in a while, so it takes a while to take effect after the switch is marked on. Secondly, once the switch is marked on, all users can only You can get the bottom-line data, but it cannot be flexibly configured according to traffic and server conditions. In addition, if the background service is down, the user may still not be able to obtain data, and a blank page may appear, so the downgrade is not real-time, not flexible enough, and not reliable.
发明内容Contents of the invention
本申请公开处理数据请求的方法,能够实现后台服务动态降级,能够根据流量和服务器情况灵活配置。This application discloses a method for processing data requests, which can realize dynamic degradation of background services and can be flexibly configured according to traffic and server conditions.
本发明的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本发明的实践而习得。Other features and advantages of the invention will become apparent from the following detailed description, or in part, be learned by practice of the invention.
根据本发明的第二方面,提供一种处理数据请求的方法,包括:According to a second aspect of the present invention, there is provided a method of processing a data request, comprising:
HTTP和反向代理服务器接收客户端的HTTP访问请求,根据所述HTTP访问请求获取访问信息,向服务集群发送包含所述访问信息的数据请求;The HTTP and reverse proxy server receives the HTTP access request of the client, obtains access information according to the HTTP access request, and sends a data request comprising the access information to the service cluster;
所述服务集群用于获取包含访问信息的数据请求,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The service cluster is used to obtain a data request containing access information, and determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch. If it is downgraded, real-time data is obtained according to the data request.
根据一些实施例,所述HTTP和反向代理服务器根据所述HTTP访问请求获取访问信息包括:According to some embodiments, the HTTP and reverse proxy server obtaining access information according to the HTTP access request includes:
所述HTTP和反向代理服务器获取所述HTTP访问请求的用户标识信息、以及获取接收所述HTTP访问请求的时间戳。The HTTP and reverse proxy server acquires user identification information of the HTTP access request, and acquires a time stamp of receiving the HTTP access request.
根据一些实施例,所述方法还包括:According to some embodiments, the method also includes:
通知服务器监听用于存储所述降级比例开关的redis缓存是否有修改,若监听到所述redis缓存有修改,向所述服务集群发送通知消息;Informing the server to monitor whether the redis cache for storing the downgrading ratio switch has been modified, and if the redis cache is detected to be modified, send a notification message to the service cluster;
所述服务集接收到所述通知消息时从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到所述服务集群的本地缓存中。When the service set receives the notification message, it reads the downgrading ratio switch from the redis cache, and stores the downgrading ratio switch in the local cache of the service cluster.
根据一些实施例,所述方法还包括:所述HTTP和反向代理服务器根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果;According to some embodiments, the method further includes: the HTTP and reverse proxy server obtains a static bottom switch according to the configuration information, and if the static bottom switch is an off flag, then obtains the request result according to the static bottom data pre-configured by the administrator;
若所述静态兜底开关为开标识则根据所述HTTP访问请求获取访问信息,向所述服务集群发送包含所述访问信息的数据请求,并将所述服务集群返回的请求结果存储到所述静态兜底数据中。If the static bottom switch is an on flag, obtain access information according to the HTTP access request, send a data request containing the access information to the service cluster, and store the request result returned by the service cluster in the static In the pocket data.
根据一些实施例,所述方法还包括,若所述客户端向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,将获取的请求结果存储到所述本地缓存中。According to some embodiments, the method further includes, if the client fails to request the HTTP access request to the HTTP and reverse proxy server, obtaining the request result according to the local cache; The server requests that the HTTP access request succeeds, and stores the obtained request result in the local cache.
根据一些实施例,所述HTTP和反向代理服务器为nginx集群。According to some embodiments, the HTTP and reverse proxy server is an nginx cluster.
根据本发明的第二方面,提供一种处理数据请求的方法,包括:According to a second aspect of the present invention, there is provided a method of processing a data request, comprising:
获取包含访问信息的数据请求;Get data requests that include access information;
根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级;determining whether the data request needs to be downgraded according to the access information and the downgrade ratio switch;
若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。If downgrade is required, the request result is obtained from the pocket cache; if downgrade is not required, real-time data is obtained according to the data request.
根据一些实施例,所述降级比例开关包括元素为开标识或关标识的数组。According to some embodiments, the downgrading ratio switch includes an array whose elements are on flags or off flags.
根据一些实施例,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级包括:According to some embodiments, determining whether to downgrade the data request according to the access information and the downgrade ratio switch includes:
根据所述访问信息进行hash运算得到hash值;performing a hash operation according to the access information to obtain a hash value;
以所述hash值为索引从所述数组中获取对应的元素;Obtain the corresponding element from the array by using the hash value as an index;
若获取的元素为开标识,则确定不需要对所述数据请求进行降级,若获取的元素为关标识,则确定需要对所述数据请求进行降级。If the acquired element is an open flag, it is determined that the data request does not need to be downgraded, and if the acquired element is an off flag, it is determined that the data request needs to be downgraded.
根据一些实施例,所述访问信息包括用户标识信息和/或访问时间戳。According to some embodiments, the access information includes user identification information and/or access timestamps.
根据一些实施例:According to some embodiments:
当通知服务器监听到用于存储所述降级比例开关的redis缓存有修改时发送通知消息;Send a notification message when the notification server detects that the redis cache for storing the downgrading ratio switch has been modified;
接收所述通知服务器发送的通知消息时,从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到本地缓存中。When receiving the notification message sent by the notification server, read the downgrade ratio switch from the redis cache, and store the downgrade ratio switch in a local cache.
根据一些实施例,接收所述通知服务器发送的通知消息包括:接收所述通知服务器通过zookeeper发送的通知消息。According to some embodiments, receiving the notification message sent by the notification server includes: receiving the notification message sent by the notification server through zookeeper.
根据一些实施例,HTTP和反向代理服务器用于根据客户端的HTTP访问请求获取所述访问信息;According to some embodiments, the HTTP and reverse proxy server is used to obtain the access information according to the HTTP access request of the client;
获取包含访问信息的数据请求包括:从所述HTTP和反向代理服务器接收包含所述访问信息的数据请求。Obtaining the data request including the access information includes: receiving the data request including the access information from the HTTP and reverse proxy server.
根据一些实施例,所述HTTP和反向代理服务器还用于根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果,不向服务集群发送所述包含所述访问信息的数据请求。According to some embodiments, the HTTP and reverse proxy server is also used to obtain the static bottom switch according to the configuration information. If the static bottom switch is an off flag, the request result is obtained according to the static bottom data pre-configured by the administrator, and no information is sent to the service. The cluster sends the data request including the access information.
根据一些实施例,所述HTTP和反向代理服务器为nginx集群。According to some embodiments, the HTTP and reverse proxy server is an nginx cluster.
需要说明的是,nginx集群接受客户端的请求之后,可以使用服务器集群的实时数据或者管理员预先配置好的静态兜底数据。It should be noted that after the nginx cluster accepts the client's request, it can use the real-time data of the server cluster or the static pocket data pre-configured by the administrator.
根据一些实施例,所述客户端用于:若向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,则将获取的请求结果存储到所述本地缓存中。According to some embodiments, the client is configured to: if requesting the HTTP access request to the HTTP and reverse proxy server fails, obtain the request result according to the local cache; if requesting the HTTP and reverse proxy server for the requested If the HTTP access request is successful, the obtained request result is stored in the local cache.
根据本发明的第三方面,提供一种处理数据请求的装置,其包括:According to a third aspect of the present invention, there is provided an apparatus for processing data requests, which includes:
请求获取单元,用于获取包含访问信息的数据请求;a request obtaining unit, configured to obtain a data request including access information;
降级判定单元,用于根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级;A downgrade determination unit, configured to determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch;
请求处理单元,用于若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The request processing unit is configured to obtain the request result from the bottom cache if downgrading is required, and obtain real-time data according to the data request if downgrading is not required.
根据一些实施例,所述降级比例开关包括元素为开标识或关标识的数组。According to some embodiments, the downgrading ratio switch includes an array whose elements are on flags or off flags.
根据一些实施例,所述降级判定单元用于:According to some embodiments, the degradation determination unit is used for:
根据所述访问信息进行hash运算得到hash值;performing a hash operation according to the access information to obtain a hash value;
以所述hash值为索引从所述数组中获取对应的元素;Obtain the corresponding element from the array by using the hash value as an index;
若获取的元素为开标识,则确定不需要对所述数据请求进行降级,若获取的元素为关标识,则确定需要对所述数据请求进行降级。If the acquired element is an open flag, it is determined that the data request does not need to be downgraded, and if the acquired element is an off flag, it is determined that the data request needs to be downgraded.
根据一些实施例,所述访问信息包括用户标识信息和/或访问时间戳。According to some embodiments, the access information includes user identification information and/or access timestamps.
根据一些实施例:According to some embodiments:
当通知服务器监听到用于存储所述降级比例开关的redis缓存有修改时发送通知消息;Send a notification message when the notification server detects that the redis cache for storing the downgrading ratio switch has been modified;
所述装置还包括开关更新单元,用于接收所述通知服务器发送的通知消息时,从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到本地缓存中。The device further includes a switch update unit, configured to read the downgrade ratio switch from the redis cache and store the downgrade ratio switch in a local cache when receiving the notification message sent by the notification server.
根据一些实施例,所述开关更新单元用于:接收所述通知服务器通过zookeeper发送的通知消息。According to some embodiments, the switch updating unit is configured to: receive a notification message sent by the notification server through zookeeper.
根据一些实施例,HTTP和反向代理服务器用于根据客户端的HTTP访问请求获取所述访问信息;According to some embodiments, the HTTP and reverse proxy server is used to obtain the access information according to the HTTP access request of the client;
所述请求获取单元用于:从所述HTTP和反向代理服务器接收包含所述访问信息的数据请求。The request acquiring unit is configured to: receive a data request including the access information from the HTTP and reverse proxy server.
根据一些实施例,所述HTTP和反向代理服务器还用于根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果,不向服务集群发送所述包含所述访问信息的数据请求。According to some embodiments, the HTTP and reverse proxy server is also used to obtain the static bottom switch according to the configuration information. If the static bottom switch is an off flag, the request result is obtained according to the static bottom data pre-configured by the administrator, and no information is sent to the service. The cluster sends the data request including the access information.
根据一些实施例,所述HTTP和反向代理服务器为nginx集群。According to some embodiments, the HTTP and reverse proxy server is an nginx cluster.
根据一些实施例,所述客户端用于:若向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,则将获取的请求结果存储到所述本地缓存中。According to some embodiments, the client is configured to: if requesting the HTTP access request to the HTTP and reverse proxy server fails, obtain the request result according to the local cache; if requesting the HTTP and reverse proxy server for the requested If the HTTP access request is successful, the obtained request result is stored in the local cache.
根据本发明的第四方面,提供一种处理数据请求的系统,包括HTTP和反向代理服务器、以及服务集群,其特征在于:According to a fourth aspect of the present invention, a system for processing data requests is provided, including HTTP and reverse proxy servers, and service clusters, characterized in that:
所述HTTP和反向代理服务器用于接收HTTP访问请求,根据所述HTTP访问请求获取访问信息,向所述服务集群发送包含所述访问信息的数据请求;The HTTP and reverse proxy server are used to receive an HTTP access request, obtain access information according to the HTTP access request, and send a data request including the access information to the service cluster;
所述服务集群用于获取包含访问信息的数据请求,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The service cluster is used to obtain a data request containing access information, and determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch. If it is downgraded, real-time data is obtained according to the data request.
根据一些实施例,所述HTTP和反向代理服务器根据所述HTTP访问请求获取访问信息包括:According to some embodiments, the HTTP and reverse proxy server obtaining access information according to the HTTP access request includes:
所述HTTP和反向代理服务器获取所述HTTP访问请求的用户标识信息、以及获取接收所述HTTP访问请求的时间戳。The HTTP and reverse proxy server acquires user identification information of the HTTP access request, and acquires a time stamp of receiving the HTTP access request.
根据一些实施例,所述系统还包括通知服务器;According to some embodiments, the system also includes a notification server;
所述通知服务器用于:监听用于存储所述降级比例开关的redis缓存是否有修改,若监听到所述redis缓存有修改,向所述服务集群发送通知消息;The notification server is used to: monitor whether the redis cache for storing the downgrading ratio switch has been modified, and send a notification message to the service cluster if it detects that the redis cache has been modified;
所述服务集群用于:接收到所述通知消息时从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到所述服务集群的本地缓存中。The service cluster is configured to: read the downgrade ratio switch from the redis cache when receiving the notification message, and store the downgrade ratio switch in a local cache of the service cluster.
根据一些实施例,所述HTTP和反向代理服务器还用于根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果;According to some embodiments, the HTTP and reverse proxy server are also used to obtain a static bottom switch according to the configuration information, and if the static bottom switch is an off flag, the request result is obtained according to the static bottom data pre-configured by the administrator;
若所述静态兜底开关为开标识则根据所述HTTP访问请求获取访问信息,向所述服务集群发送包含所述访问信息的数据请求,并将所述服务集群返回的请求结果存储到所述静态兜底数据中。If the static bottom switch is an on flag, obtain access information according to the HTTP access request, send a data request containing the access information to the service cluster, and store the request result returned by the service cluster in the static In the pocket data.
根据一些实施例,所述系统还包括客户端,所述客户端用于,若向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,将获取的请求结果存储到所述本地缓存中。According to some embodiments, the system further includes a client, and the client is configured to, if requesting the HTTP access request to the HTTP and reverse proxy server fails, obtain the request result according to the local cache; The HTTP and reverse proxy server requests that the HTTP access request succeeds, and stores the acquired request result in the local cache.
根据一些实施例,所述HTTP和反向代理服务器为nginx集群。According to some embodiments, the HTTP and reverse proxy server is an nginx cluster.
根据本发明的第五方面,提供一种服务集群,包括:处理器;存储器,存储用于处理器控制如第一方任一项所述操作的指令。According to a fifth aspect of the present invention, there is provided a service cluster, including: a processor; and a memory storing instructions for the processor to control the operations described in any one of the first party.
根据本发明的第六方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如如第一方任一项所述操作的步骤。According to a sixth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the operation steps as described in any one of the first party are implemented.
本申请的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
本申请的实施例提供的技术方案能够实现后台服务动态降级,能够根据流量和服务器情况灵活配置。应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本发明。The technical solutions provided by the embodiments of the present application can realize dynamic degradation of background services, and can be flexibly configured according to traffic and server conditions. It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention.
附图说明Description of drawings
通过参照附图详细描述其示例实施例,本发明的上述和其它特征及优点将变得更加明显。The above and other features and advantages of the present invention will become more apparent by describing in detail example embodiments thereof with reference to the accompanying drawings.
图1示出了根据本发明一实施例的处理数据请求的方法;Fig. 1 shows a method for processing a data request according to an embodiment of the present invention;
图2示出了根据本发明一实施例的处理数据请求的方法;Fig. 2 shows a method for processing a data request according to an embodiment of the present invention;
图3示出了根据本发明另一实施例的处理数据请求的方法;FIG. 3 shows a method for processing a data request according to another embodiment of the present invention;
图4示出了根据本发明另一实施例的处理数据请求的系统示意图;Fig. 4 shows a schematic diagram of a system for processing data requests according to another embodiment of the present invention;
图5示出了根据本发明一实施例的处理数据请求的系统中客户端处理罗辑流程图;FIG. 5 shows a logical flowchart of client processing in a system for processing data requests according to an embodiment of the present invention;
图6示出了根据本发明一实施例的处理数据请求的系统中HTTP和反向代理服务器处理罗辑流程图;Fig. 6 shows HTTP and reverse proxy server processing logic flow chart in the system for processing data requests according to an embodiment of the present invention;
图7示出了根据本发明一实施例的处理数据请求的系统中通知服务器处理罗辑流程图;Fig. 7 shows a logical flowchart of notification server processing in the system for processing data requests according to an embodiment of the present invention;
图8示出了根据本发明一实施例的处理数据请求的系统中服务集群处理罗辑流程图;Fig. 8 shows a logical flowchart of service cluster processing in the system for processing data requests according to an embodiment of the present invention;
图9示出了根据本发明一实施例的处理数据请求的系统中服务集群进行hash运算过程示意图;FIG. 9 shows a schematic diagram of a hash operation process performed by a service cluster in a system for processing data requests according to an embodiment of the present invention;
图10示出了根据本发明一实施例的处理数据请求的装置的框图;Fig. 10 shows a block diagram of an apparatus for processing data requests according to an embodiment of the present invention;
图11示出了根据本发明另一实施例的处理数据请求的装置的框图;Fig. 11 shows a block diagram of an apparatus for processing data requests according to another embodiment of the present invention;
图12示出了根据本发明一实施例的服务集群。Fig. 12 shows a service cluster according to an embodiment of the present invention.
具体实施方式detailed description
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本发明将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus their repeated descriptions will be omitted.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本发明的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本发明的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本发明的各方面。Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of embodiments of the invention. However, those skilled in the art will appreciate that the technical solutions of the present invention may be practiced without one or more of the specific details, or other methods, components, means, steps, etc. may be employed. In other instances, well-known methods, apparatus, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices entity.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are only exemplary illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partly combined, so the actual order of execution may be changed according to the actual situation.
图1示出了根据本发明一实施例的处理数据请求的方法,如图1所示,本实施例所述的处理数据请求的方法包括:FIG. 1 shows a method for processing a data request according to an embodiment of the present invention. As shown in FIG. 1 , the method for processing a data request in this embodiment includes:
在步骤S110中,HTTP和反向代理服务器接收客户端的HTTP访问请求,根据所述HTTP访问请求获取访问信息,向服务集群发送包含所述访问信息的数据请求。In step S110, the HTTP and reverse proxy server receives the HTTP access request from the client, obtains access information according to the HTTP access request, and sends a data request containing the access information to the service cluster.
其中,所述HTTP和反向代理服务器包括但不限于nginx集群。Wherein, the HTTP and reverse proxy server include but not limited to nginx cluster.
在步骤S120中,所述服务集群用于获取包含访问信息的数据请求,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。In step S120, the service cluster is used to obtain a data request containing access information, and determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch, and if downgrade is required, obtain the request from the pocket cache As a result, real-time data is obtained according to the data request if no downgrade is required.
其中,所述HTTP和反向代理服务器根据所述HTTP访问请求获取访问信息可包括:所述HTTP和反向代理服务器获取所述HTTP访问请求的用户标识信息、以及获取接收所述HTTP访问请求的时间戳。Wherein, the HTTP and reverse proxy server obtaining access information according to the HTTP access request may include: the HTTP and reverse proxy server obtaining the user identification information of the HTTP access request, and obtaining the user ID of the HTTP access request timestamp.
所述通知服务器还可监听用于存储所述降级比例开关的redis缓存是否有修改,若监听到所述redis缓存有修改,向所述服务集群发送通知消息;所述服务集接收到所述通知消息时从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到所述服务集群的本地缓存中。The notification server can also monitor whether the redis cache for storing the downgrading ratio switch has been modified, and if it detects that the redis cache has been modified, send a notification message to the service cluster; the service set receives the notification When sending a message, read the downgrading ratio switch from the redis cache, and store the downgrading ratio switch in the local cache of the service cluster.
另外,所述HTTP和反向代理服务器根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果,若所述静态兜底开关为开标识则根据所述HTTP访问请求获取访问信息,向所述服务集群发送包含所述访问信息的数据请求,并将所述服务集群返回的请求结果存储到所述静态兜底数据中。In addition, the HTTP and reverse proxy server obtains the static bottom switch according to the configuration information, if the static bottom switch is an off flag, then obtains the request result according to the static bottom data preconfigured by the administrator, if the static bottom switch is an open flag Obtain access information according to the HTTP access request, send a data request containing the access information to the service cluster, and store the request result returned by the service cluster in the static pocket data.
需要说明提,若所述客户端向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,还可根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,则可将获取的请求结果存储到所述本地缓存中。It should be noted that if the client fails to request the HTTP access request to the HTTP and reverse proxy server, the request result can also be obtained according to the local cache; if the HTTP access request is requested to the HTTP and reverse proxy server If the request is successful, the obtained request result may be stored in the local cache.
图2示出了根据本发明一实施例的处理数据请求的方法,本实施例可适用于服务集群处理HTTP和反向代理服务器转发的客户端HTTP请求的情况,方法的执行主体为服务集群。如图2所示,本实施例所述的处理数据请求的方法包括:FIG. 2 shows a method for processing data requests according to an embodiment of the present invention. This embodiment is applicable to the situation where the service cluster processes HTTP and client HTTP requests forwarded by the reverse proxy server. The execution subject of the method is the service cluster. As shown in Figure 2, the method for processing data requests described in this embodiment includes:
在步骤S210中,获取包含访问信息的数据请求。In step S210, a data request including access information is acquired.
例如所述访问信息为用户标识信息、或者访问时间戳、或者为用户标识信息和访问时间戳。For example, the access information is user identification information, or access time stamp, or user identification information and access time stamp.
在步骤S220中,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级。In step S220, it is determined whether the data request needs to be downgraded according to the access information and the downgrade ratio switch.
所述降级比例开关是管理员设置的开关,可用以控制允许当前用户访问时获取实时数据的比例。The downgrading ratio switch is a switch set by the administrator, which can be used to control the ratio of real-time data obtained when the current user is allowed to access.
为了应对在秒杀促销等特殊时间流量突然增大导致后台服务器挂掉、对请求处理不及时、或返回页面开天窗等情况,相关技术通过管理员设置流量阈值开关,管理员一旦发现流量超过该阈值后打开降级开关,所有用户的请求直接返回兜底数据。In order to deal with situations such as the sudden increase in traffic at special times such as flash sales promotions that cause the background server to hang up, the request is not processed in time, or the skylight is opened when returning to the page, the related technology uses the administrator to set the traffic threshold switch. Once the administrator finds that the traffic exceeds the threshold Turn on the downgrade switch, and all user requests will directly return the pocket data.
而本实施例的技术方案与上述相关技术相比,在开关设置和降级处理上均有区别。本实施例是通过降级比例开关,以动态灵活地控制后台服务的降级比例。However, compared with the above-mentioned related technologies, the technical solution of this embodiment is different in switch settings and degradation processing. In this embodiment, the downgrade ratio of the background service is dynamically and flexibly controlled through a downgrade ratio switch.
所述降级比例开关需要满足管理员根据预期流量灵活设置降级比例的需求,其具体形式本实施例对此不作限定。例如元素为开标识或关标识的数组,例如将降级比例开关设置为元素为0或1的数组,将0定义为关标识,表示需要降级,将1定义为开标识表示不需要降级。The downgrading ratio switch needs to meet the requirement of the administrator to flexibly set the downgrading ratio according to the expected traffic, and its specific form is not limited in this embodiment. For example, the element is an array of on or off flags. For example, set the downgrade ratio switch to an array whose elements are 0 or 1. Define 0 as the off flag to indicate that downgrade is required, and define 1 as the on flag to indicate that downgrade is not required.
例如,根据所述访问信息进行hash运算得到hash值,将所述hash值与所述降级比例开关进行比对确定是否需要对所述数据请求进行降级。For example, a hash value is obtained by performing a hash operation according to the access information, and the hash value is compared with the downgrade ratio switch to determine whether the data request needs to be downgraded.
在步骤S230中,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。In step S230, if downgrade is required, the request result is obtained from the bottom cache, and if downgrade is not required, real-time data is obtained according to the data request.
本实施例通过在服务集群端获取到数据请求之后,根据访问信息和降级比例开关确定是否需要对所述数据请求进行降级,从而选择从兜底缓存中获取请求结果或根据所述数据请求获取实时数据,能够实现后台服务动态降级,能够根据流量和服务器情况灵活配置。In this embodiment, after the service cluster side obtains the data request, it is determined whether the data request needs to be downgraded according to the access information and the downgrade ratio switch, so as to choose to obtain the request result from the pocket cache or obtain real-time data according to the data request , which can realize dynamic downgrading of background services, and can be flexibly configured according to traffic and server conditions.
图3示出了根据本发明另一实施例的处理数据请求的方法,本实施例可适用于服务集群处理HTTP和反向代理服务器转发的客户端HTTP请求的情况,方法的执行主体为服务集群。如图3所示,本实施例所述的处理数据请求的方法包括:Figure 3 shows a method for processing data requests according to another embodiment of the present invention. This embodiment is applicable to the situation where the service cluster processes HTTP and the client HTTP request forwarded by the reverse proxy server. The execution subject of the method is the service cluster . As shown in Figure 3, the method for processing a data request described in this embodiment includes:
在步骤S310中,当接收到通知服务器发送的通知消息时,从redis缓存中读取降级比例开关,将所述降级比例开关存放到本地缓存中。In step S310, when the notification message sent by the notification server is received, the downgrade ratio switch is read from the redis cache, and the downgrade ratio switch is stored in the local cache.
本实施例设置了通知服务器进行通知处理,当通知服务器监听到用于存储所述降级比例开关的redis缓存有修改时发送通知消息。In this embodiment, a notification server is set to perform notification processing, and a notification message is sent when the notification server detects that the redis cache for storing the downgrading ratio switch has been modified.
因此,服务集群接收所述通知服务器发送的通知消息时,从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到本地缓存中。Therefore, when the service cluster receives the notification message sent by the notification server, it reads the downgrade ratio switch from the redis cache, and stores the downgrade ratio switch in a local cache.
需要说明的是,通知服务器向服务集群发送通知消息可具体通过zookeeper来发送。It should be noted that, the notification server may specifically send the notification message to the service cluster through zookeeper.
在步骤S320中,获取包含访问信息的数据请求。In step S320, a data request including access information is acquired.
对于大型电子商务网站来说,一般在服务集群与客户端之间,会设置HTTP和反向代理服务器,例如nginx集群、Apach、或haproxy等。For large-scale e-commerce websites, HTTP and reverse proxy servers, such as nginx cluster, Apache, or haproxy, are generally set up between the service cluster and the client.
因此,通常是所述HTTP和反向代理服务器接收客户端发送的HTTP访问请求,根据所述HTTP访问请求获取访问信息,向服务集群发送包含所述访问信息的数据请求。Therefore, usually the HTTP and reverse proxy server receives the HTTP access request sent by the client, obtains access information according to the HTTP access request, and sends a data request containing the access information to the service cluster.
在步骤S330中,从所述本地缓存中读取所述降级比例开关。In step S330, the downgrading ratio switch is read from the local cache.
需要说明的是,因为通过步骤S210中,降级比例开关一旦有修改,服务集群能及时将最新的降级比例开关更新到本地缓存中,因此服务集群的本地缓存中的降级比例开关均为最新的降级比例开关。It should be noted that, because in step S210, once the downgrading ratio switch is modified, the service cluster can update the latest downgrading ratio switch to the local cache in time, so the downgrading ratio switches in the local cache of the service cluster are all the latest downgrading ratio switches proportional switch.
在步骤S340中,根据所述访问信息以及所述降级比例开关确定是否需要对所述数据请求进行降级。In step S340, it is determined whether the data request needs to be downgraded according to the access information and the downgrade ratio switch.
在步骤S350中,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。In step S350, if downgrade is required, the request result is obtained from the bottom cache, and if downgrade is not required, real-time data is obtained according to the data request.
进一步地,为了避免服务集群罢工出现客户端返回结果而出现空白页的情况,所述HTTP和反向代理服务器还可根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果,不向服务集群发送所述包含所述访问信息的数据请求。Further, in order to avoid the situation where the client returns a result and a blank page occurs when the service cluster goes on strike, the HTTP and reverse proxy server can also obtain a static bottom switch according to the configuration information, and if the static bottom switch is an off flag, then according to the management The result of obtaining the request for static pocket data pre-configured by the member, and not sending the data request containing the access information to the service cluster.
更进一步地,为了避免客户端向所述HTTP和反向代理服务器请求失败而出面空白页的情况,所述客户端还可用于:若向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,则将获取的请求结果存储到所述本地缓存中。Furthermore, in order to prevent the client from requesting the HTTP and reverse proxy server to fail and display a blank page, the client can also be used to: if requesting the HTTP access request to the HTTP and reverse proxy server If it fails, the request result is obtained according to the local cache; if the HTTP access request is successfully requested to the HTTP and reverse proxy server, the obtained request result is stored in the local cache.
本实施例在前述实施例的基础之上,进一步采用通知的方法,一旦管理员修改了阶级比例开关,则通知服务器从redis缓存中读取降级比例开关,能保证降级处理的实时性。On the basis of the foregoing embodiments, this embodiment further adopts a notification method. Once the administrator modifies the class ratio switch, the server is notified to read the downgrade ratio switch from the redis cache, which can ensure the real-time performance of downgrade processing.
图4示出了根据本发明另一实施例的处理数据请求的系统示意图,如图4所示,对后台系统来说,该处理数据请求的系统包括HTTP和反向代理服务器(例如nginx集群410,图4中以nginx集群作为示例)、服务集群420、以及通知服务器430。Fig. 4 shows a schematic diagram of a system for processing data requests according to another embodiment of the present invention. As shown in Fig. 4, for background systems, the system for processing data requests includes HTTP and reverse proxy servers (such as nginx cluster 410 , taking the nginx cluster as an example in FIG. 4 ), the service cluster 420, and the notification server 430.
所述nginx集群410用于接收HTTP访问请求,根据所述HTTP访问请求获取访问信息(例如获取所述HTTP访问请求的用户标识信息、以及获取接收所述HTTP访问请求的时间戳),向所述服务集群420发送包含所述访问信息的数据请求;The nginx cluster 410 is used to receive an HTTP access request, obtain access information according to the HTTP access request (for example, obtain the user identification information of the HTTP access request, and obtain the time stamp of receiving the HTTP access request), and send the HTTP access request to the The service cluster 420 sends a data request including the access information;
所述服务集群420用于获取包含访问信息的数据请求,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级,若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The service cluster 420 is used to obtain a data request containing access information, and determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch. If downgrade is required, the request result is obtained from the pocket cache. If degradation is required, real-time data is obtained according to the data request.
所述通知服务器430用于:监听用于存储所述降级比例开关的redis缓存是否有修改,若监听到所述redis缓存有修改,向所述服务集群420发送通知消息。The notification server 430 is configured to: monitor whether the redis cache for storing the downgrade ratio switch has been modified, and send a notification message to the service cluster 420 if it detects that the redis cache has been modified.
所述服务集群420还用于:接收到所述通知消息时从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到所述服务集群420的本地缓存中。The service cluster 420 is further configured to: read the downgrade ratio switch from the redis cache when receiving the notification message, and store the downgrade ratio switch in a local cache of the service cluster 420 .
进一步地,进一步地,为了避免服务集群420罢工出现客户端440返回结果而出现空白页的情况,所述Nginx集群410还用于根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果。Further, further, in order to avoid the situation that the client 440 returns a result and a blank page occurs when the service cluster 420 goes on strike, the Nginx cluster 410 is also used to obtain a static bottom switch according to the configuration information, if the static bottom switch is an off flag The request result is obtained according to the static pocket data pre-configured by the administrator.
若所述静态兜底开关为开标识则根据所述HTTP访问请求获取访问信息,向所述服务集群420发送包含所述访问信息的数据请求,并将所述服务集群420返回的请求结果存储到所述静态兜底数据中。If the static bottom switch is an open flag, access information is obtained according to the HTTP access request, a data request including the access information is sent to the service cluster 420, and the request result returned by the service cluster 420 is stored in the In the above static pocket data.
进一步地,为了避免客户端440向所述HTTP和反向代理服务器请求失败而出面空白页的情况,所述客户端440还可进一步改进,例如若向所述nginx集群410请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述nginx集群410请求所述HTTP访问请求成功,将获取的请求结果存储到所述本地缓存中。Further, in order to avoid the situation that the client 440 fails to request the HTTP and reverse proxy server and presents a blank page, the client 440 can be further improved, for example, if the HTTP access request is requested to the nginx cluster 410 If it fails, the request result is obtained according to the local cache; if the HTTP access request is successfully requested to the nginx cluster 410, the obtained request result is stored in the local cache.
本面通过逻辑流程图分别描述系统中各模块的处理逻辑。This page describes the processing logic of each module in the system through a logic flow chart.
图5示出了根据本发明一实施例的处理数据请求的系统中客户端处理罗辑流程图,如图5所示,本实施例所述的客户端处理罗辑包括:Fig. 5 shows a flow chart of the client processing logic in the system for processing data requests according to an embodiment of the present invention. As shown in Fig. 5, the client processing logic described in this embodiment includes:
在步骤S510中,客户端向后台请求数据。In step S510, the client requests data from the background.
在步骤S520中,判断请求数据是否成功,若是则执行步骤S540,否则执行步骤S530。In step S520, it is judged whether the request data is successful, if so, execute step S540, otherwise execute step S530.
即如果请求成功则将请求结果缓存在本地,如果请求失败则使用上次请求成功的本地缓存。That is, if the request is successful, the request result is cached locally, and if the request fails, the local cache of the last successful request is used.
在步骤S530中,使用上次缓存结果,执行步骤S550。In step S530, step S550 is executed using the last cached result.
在步骤S540中,将本次成功请求结果缓存到本地,执行步骤S550。In step S540, the result of the successful request is cached locally, and step S550 is executed.
在步骤S550中,进行展示,结束。In step S550, the presentation is performed and the process ends.
图6示出了根据本发明一实施例的处理数据请求的系统中HTTP和反向代理服务器处理罗辑流程图,如图6所示,本实施例所述的HTTP和反向代理服务器处理罗辑包括:Fig. 6 shows the flow chart of HTTP and reverse proxy server processing logic in the system for processing data requests according to an embodiment of the present invention. As shown in Fig. 6, the HTTP and reverse proxy server processing logic described in this embodiment Editions include:
在步骤S610中,判断是否使用静态兜底,若是则执行步骤S630,否则执行步骤S620。In step S610, it is judged whether to use the static cover, if so, execute step S630, otherwise execute step S620.
读取nginx配置,判断是否需要使用静态兜底数据,如果静态兜底开关已经打开则直接读取静态兜底数据,静态兜底数据是管理员预先配置好的数据,一旦服务集群不可用,则使用静态兜底数据,否则向服务集群请求数据,返回结果Read the nginx configuration to determine whether to use static pocket data. If the static pocket switch is turned on, read the static pocket data directly. The static pocket data is the data pre-configured by the administrator. Once the service cluster is unavailable, use the static pocket data , otherwise request data from the service cluster and return the result
在步骤S620中,请求服务集群,执行步骤S640。In step S620, the service cluster is requested, and step S640 is executed.
在步骤S630中,使用静态兜底数据,执行步骤S640。In step S630, use the static background data, and execute step S640.
在步骤S640中,返回结果。In step S640, the result is returned.
图7示出了根据本发明一实施例的处理数据请求的系统中通知服务器处理罗辑流程图,如图7所示,本实施例所述的通知服务器处理罗辑包括:Fig. 7 shows a flow chart of the notification server processing logic in the system for processing data requests according to an embodiment of the present invention. As shown in Fig. 7, the notification server processing logic described in this embodiment includes:
在步骤S710中,将降级比例开关写入redis。In step S710, the downgrade ratio switch is written into redis.
即管理员修改降级比例开关后,将降级比例开关写入redis中。That is, after the administrator modifies the downgrade ratio switch, write the downgrade ratio switch into redis.
在步骤S720中,监听开关是否有变化,若是则执行步骤S630,否则重复执行本步骤S720。In step S720, monitor whether the switch is changed, if yes, execute step S630, otherwise, repeat this step S720.
通知中心监控到降级比例开关有变化,通知中心通过zookeeper通知服务集群更新降级比例开关。The notification center monitors the change of the downgrade ratio switch, and the notification center notifies the service cluster to update the downgrade ratio switch through zookeeper.
在步骤S730中,通知服务集群降级比例开关变化。In step S730, the service cluster is notified of the change of the downgrade ratio switch.
在步骤S740中,服务集群从redis中读取降级比例开关存入本地缓存。In step S740, the service cluster reads the degradation ratio switch from redis and stores it in a local cache.
服务集群收到通知中心的更新,则从redis中读取降级比例开关,放入服务器本地缓存。When the service cluster receives the update from the notification center, it reads the downgrade ratio switch from redis and puts it into the local cache of the server.
图8示出了根据本发明一实施例的处理数据请求的系统中服务集群处理罗辑流程图,如图8所示,本实施例所述的服务集群处处理罗辑包括:FIG. 8 shows a flow chart of the service cluster processing logic in the system for processing data requests according to an embodiment of the present invention. As shown in FIG. 8 , the processing logic at the service cluster in this embodiment includes:
在步骤S810中,接收客户端请求。In step S810, a client request is received.
在步骤S820中,将用户UUID和时间戳进行hash运算。In step S820, hash operation is performed on the user UUID and the time stamp.
例如,每个客户端都有一个唯一标识符UUID,将UUID和当前系统时间合在一起进行hash,hash值的范围为0到100。For example, each client has a unique identifier UUID, which is hashed by combining the UUID and the current system time, and the hash value ranges from 0 to 100.
在步骤S830中,将hash运算结果和降级比例开关进行匹配运算。In step S830, a matching operation is performed on the hash operation result and the downgrading ratio switch.
例如将hash计算得到的值和系统本地缓存的信息进行对比,判断是否需要降级,如果需要降级,则获取兜底缓存中的数据;如果不需要降级,则请求服务计算模块获取实时数据,并将成功获取到的数据放入兜底缓存中,作为最新的动态兜底数据。For example, compare the value calculated by the hash with the information in the local cache of the system to determine whether downgrade is required. If downgrade is required, the data in the bottom cache will be obtained; if no downgrade is required, the service computing module will be requested to obtain real-time data and will succeed The acquired data is put into the pocket cache as the latest dynamic pocket data.
在步骤S840中,确定是否需要降级,若是则执行步骤S770,否则重复执行本步骤S850。In step S840, it is determined whether a downgrade is required, if so, perform step S770, otherwise, repeat this step S850.
在步骤S850中,获取实时数据。In step S850, real-time data is acquired.
在步骤S860中,将实时数据放入兜底缓存。In step S860, put the real-time data into the pocket cache.
在步骤S870中,获取兜底缓存数据。In step S870, the bottom cache data is acquired.
在步骤S880中,返回结果。In step S880, the result is returned.
图9示出了一种处理数据请求的系统中服务集群进行hash运算过程示意图,用户的每个请求都会带上UUID,UUID是用户的唯一标示,每个用户拥有一个唯一的标识,ttime表示服务器的当前时间,将两者合在一起进行hash得到hash值,并将得到的hash值和降级比例开关对比,降级比例开关为下标0到99的数组,数组的值为0和1,0表示获取实时数据,1表示使用动态兜底数据。例如0b0a2e7e152410eae7a09276211bdde3e141df5d表示用户的UUID,1488857570表示当前服务器的Unix时间戳,两者相加并hash得到的值为2,从开关数组中获取下标为2的值,为1则表示需要使用兜底数据。Figure 9 shows a schematic diagram of the hash operation process of the service cluster in the system for processing data requests. Each request of the user will carry a UUID. UUID is the unique identifier of the user. Each user has a unique identifier. ttime indicates the server Combine the two together to get the hash value, and compare the obtained hash value with the downgrade ratio switch. The downgrade ratio switch is an array with subscripts from 0 to 99. The values of the array are 0 and 1, and 0 means Obtain real-time data, 1 means use dynamic pocket data. For example, 0b0a2e7e152410eae7a09276211bdde3e141df5d represents the UUID of the user, and 1488857570 represents the Unix timestamp of the current server. The value obtained by adding the two and hashing is 2, and the value with subscript 2 is obtained from the switch array. If it is 1, it means that the bottom data needs to be used.
上述实施例的技术方案的示例具有如下特点:The example of the technical solution of the foregoing embodiment has the following characteristics:
首先,采用三级兜底的技术方案:后台动态降级,后台静态降级和客户端缓存降级,每一级对用户体验的友好程度依次降低,可靠性依次增高,降级优先级依次下降。First, a three-level technical solution is adopted: background dynamic downgrade, background static downgrade, and client cache downgrade. Each level is less friendly to user experience, higher in reliability, and lower in downgrade priority.
前端采用本地缓存的兜底方式,后台采用动态兜底和静态兜底相结合的方式,三级兜底保证了服务的高可用性,避免了用户出现空白页面的情况。The front-end adopts a local caching bottom-up method, and the backend adopts a combination of dynamic bottom-up and static bottom-up. The three-level bottom-up ensures high availability of services and avoids blank pages for users.
其次,通过将用户UUID和时间戳结合,并用哈希函数映射到0到99范围内,可以动态灵活控制后台服务的降级比例。实现了后台服务的动态降级,管理员可以灵活控制服务的降级比例,在降低服务器压力的同时保证了用户的体验。Secondly, by combining the user UUID with the timestamp and mapping it to a range from 0 to 99 with a hash function, the degradation ratio of background services can be dynamically and flexibly controlled. The dynamic degradation of background services is realized, and administrators can flexibly control the degradation ratio of services, which ensures user experience while reducing server pressure.
另外,采用zookeeper通知的方法,一旦用户修改了降级比例开关,则通知服务器从redis缓存中读取降级比例开关,保证了兜底开关的实时性和统一性。In addition, the zookeeper notification method is used. Once the user modifies the downgrade ratio switch, the server is notified to read the downgrade ratio switch from the redis cache, which ensures the real-time and uniformity of the bottom switch.
图10示出了根据本发明一实施例的处理数据请求的装置的框图,如图10所示,本实施例所述的处理数据请求的装置包括请求获取单元1010、降级判定单元1020、以及请求处理单元1030。Fig. 10 shows a block diagram of a device for processing data requests according to an embodiment of the present invention. As shown in Fig. processing unit 1030 .
该请求获取单元1010,用于获取包含访问信息的数据请求;The request obtaining unit 1010 is configured to obtain a data request including access information;
该降级判定单元1020,用于根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级;The downgrade determination unit 1020 is configured to determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch;
该请求处理单元1030,用于若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The request processing unit 1030 is configured to obtain the request result from the pocket cache if downgrade is required, and obtain real-time data according to the data request if downgrade is not required.
根据一些实施例,所述降级比例开关包括元素为开标识或关标识的数组。According to some embodiments, the downgrading ratio switch includes an array whose elements are on flags or off flags.
根据一些实施例,所述降级判定单元1020用于:According to some embodiments, the downgrade determination unit 1020 is configured to:
根据所述访问信息进行hash运算得到hash值;performing a hash operation according to the access information to obtain a hash value;
以所述hash值为索引从所述数组中获取对应的元素;Obtain the corresponding element from the array by using the hash value as an index;
若获取的元素为开标识,则确定不需要对所述数据请求进行降级,若获取的元素为关标识,则确定需要对所述数据请求进行降级。If the acquired element is an open flag, it is determined that the data request does not need to be downgraded, and if the acquired element is an off flag, it is determined that the data request needs to be downgraded.
根据一些实施例,所述访问信息包括用户标识信息和/或访问时间戳。According to some embodiments, the access information includes user identification information and/or access timestamps.
关于上述实施例中的装置,其中各个单元执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
本实施例提供的处理数据请求的装置可执行本发明方法实施例所提供的处理数据请求的方法,具备执行方法相应的功能模块和有益效果。The device for processing data requests provided in this embodiment can execute the method for processing data requests provided in the method embodiments of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
图11示出了根据本发明另一实施例的处理数据请求的装置的框图,如图11所示,本实施例所述的处理数据请求的装置包括:请求获取单元1110、开关更新单元1120、降级判定单元1130、以及请求处理单元1140。Fig. 11 shows a block diagram of a device for processing data requests according to another embodiment of the present invention. As shown in Fig. 11 , the device for processing data requests in this embodiment includes: a request obtaining unit 1110, a switch updating unit 1120, A downgrade determination unit 1130 and a request processing unit 1140 .
该请求获取单元1110被配置为,用于获取包含访问信息的数据请求。The request obtaining unit 1110 is configured to obtain a data request including access information.
该开关更新单元1120被配置为,用于接收所述通知服务器发送的通知消息时,从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到本地缓存中。The switch update unit 1120 is configured to read the downgrade ratio switch from the redis cache and store the downgrade ratio switch in a local cache when receiving the notification message sent by the notification server.
该降级判定单元1130被配置为,用于根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级。The downgrade determination unit 1130 is configured to determine whether the data request needs to be downgraded according to the access information and the downgrade ratio switch.
该请求处理单元1140被配置为,用于若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。The request processing unit 1140 is configured to obtain the request result from the bottom cache if downgrading is required, and obtain real-time data according to the data request if downgrading is not required.
需要说明的是,当通知服务器监听到用于存储所述降级比例开关的redis缓存有修改时发送通知消息。It should be noted that a notification message is sent when the notification server detects that the redis cache for storing the downgrading ratio switch has been modified.
根据一些实施例,所述降级比例开关包括元素为开标识或关标识的数组。According to some embodiments, the downgrading ratio switch includes an array whose elements are on flags or off flags.
根据一些实施例,所述降级判定单元1130用于:According to some embodiments, the downgrade determination unit 1130 is configured to:
根据所述访问信息进行hash运算得到hash值;performing a hash operation according to the access information to obtain a hash value;
以所述hash值为索引从所述数组中获取对应的元素;Obtain the corresponding element from the array by using the hash value as an index;
若获取的元素为开标识,则确定不需要对所述数据请求进行降级,若获取的元素为关标识,则确定需要对所述数据请求进行降级。If the acquired element is an open flag, it is determined that the data request does not need to be downgraded, and if the acquired element is an off flag, it is determined that the data request needs to be downgraded.
根据一些实施例,所述访问信息包括用户标识信息和/或访问时间戳。According to some embodiments, the access information includes user identification information and/or access timestamps.
根据一些实施例,所述开关更新单元1120用于:接收所述通知服务器通过zookeeper发送的通知消息。According to some embodiments, the switch updating unit 1120 is configured to: receive a notification message sent by the notification server through zookeeper.
根据一些实施例,HTTP和反向代理服务器用于根据客户端的HTTP访问请求获取所述访问信息;According to some embodiments, the HTTP and reverse proxy server is used to obtain the access information according to the HTTP access request of the client;
所述请求获取单元1110用于:从所述HTTP和反向代理服务器接收包含所述访问信息的数据请求。The request acquiring unit 1110 is configured to: receive a data request including the access information from the HTTP and reverse proxy server.
根据一些实施例,所述HTTP和反向代理服务器还用于根据配置信息获取静态兜底开关,若所述静态兜底开关为关标识则根据管理员预先配置的静态兜底数据获取请求结果,不向服务集群发送所述包含所述访问信息的数据请求。According to some embodiments, the HTTP and reverse proxy server is also used to obtain the static bottom switch according to the configuration information. If the static bottom switch is an off flag, the request result is obtained according to the static bottom data pre-configured by the administrator, and no information is sent to the service. The cluster sends the data request including the access information.
根据一些实施例,所述HTTP和反向代理服务器为nginx集群。According to some embodiments, the HTTP and reverse proxy server is an nginx cluster.
根据一些实施例,所述客户端用于:若向所述HTTP和反向代理服务器请求所述HTTP访问请求失败,则根据本地缓存获取请求结果;若向所述HTTP和反向代理服务器请求所述HTTP访问请求成功,则将获取的请求结果存储到所述本地缓存中。According to some embodiments, the client is configured to: if requesting the HTTP access request to the HTTP and reverse proxy server fails, obtain the request result according to the local cache; if requesting the HTTP and reverse proxy server for the requested If the HTTP access request is successful, the obtained request result is stored in the local cache.
本实施例提供的处理数据请求的装置可执行本发明方法实施例所提供的处理数据请求的方法,具备执行方法相应的功能模块和有益效果。The device for processing data requests provided in this embodiment can execute the method for processing data requests provided in the method embodiments of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
图12示出了根据本发明一实施例的服务集群,如图12所示,服务集群1200可包括处理器1210、存储器1220、发射器1230及接收器1240。FIG. 12 shows a service cluster according to an embodiment of the present invention. As shown in FIG. 12 , the service cluster 1200 may include a processor 1210 , a memory 1220 , a transmitter 1230 and a receiver 1240 .
存储器1220可存储用于处理器1210控制操作处理的指令。存储器1220可包括易失性或非易失性存储器,如静态随机存取存储器(SRAM)、电可擦除可编程只读存储器(EEPROM)、可擦除可编程只读存储器(EPROM)、可编程只读存储器(PROM)、只读存储器(ROM)等,本发明对此没有限制。The memory 1220 may store instructions for the processor 1210 to control operation processing. Memory 1220 may include volatile or nonvolatile memory such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable Program read only memory (PROM), read only memory (ROM), etc., the present invention is not limited thereto.
处理器1210可调用存储器1220中存储的指令控制相关操作。根据一实施例,存储器1220存储用于处理器1210控制以下操作的指令:The processor 1210 can call instructions stored in the memory 1220 to control related operations. According to one embodiment, the memory 1220 stores instructions for the processor 1210 to control the following operations:
获取包含访问信息的数据请求;Get data requests that include access information;
根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级;determining whether the data request needs to be downgraded according to the access information and the downgrade ratio switch;
若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。If downgrade is required, the request result is obtained from the pocket cache; if downgrade is not required, real-time data is obtained according to the data request.
易于理解,存储器1220还可存储用于处理器1210控制根据本发明实施例的其他操作的指令,这里不再赘述。It is easy to understand that the memory 1220 may also store instructions for the processor 1210 to control other operations according to the embodiment of the present invention, which will not be repeated here.
处理器1210还可控制发射器1230和接收器1240进行信号收发等。The processor 1210 may also control the transmitter 1230 and the receiver 1240 to perform signal transceiving and the like.
通过以上的详细描述,本领域的技术人员易于理解,根据本发明实施例的系统和方法具有以下优点中的一个或多个。Through the above detailed description, those skilled in the art can easily understand that the system and method according to the embodiments of the present invention have one or more of the following advantages.
根据本发明的实施例,所述降级比例开关包括元素为开标识或关标识的数组。According to an embodiment of the present invention, the downgrading ratio switch includes an array whose elements are on flags or off flags.
根据本发明的一些实施例,根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级包括:According to some embodiments of the present invention, determining whether to downgrade the data request according to the access information and the downgrade ratio switch includes:
根据所述访问信息进行hash运算得到hash值;performing a hash operation according to the access information to obtain a hash value;
以所述hash值为索引从所述数组中获取对应的元素;Obtain the corresponding element from the array by using the hash value as an index;
若获取的元素为开标识,则确定不需要对所述数据请求进行降级,若获取的元素为关标识,则确定需要对所述数据请求进行降级。If the acquired element is an open flag, it is determined that the data request does not need to be downgraded, and if the acquired element is an off flag, it is determined that the data request needs to be downgraded.
根据本发明的一些实施例,当通知服务器监听到用于存储所述降级比例开关的redis缓存有修改时发送通知消息;According to some embodiments of the present invention, a notification message is sent when the notification server detects that the redis cache for storing the downgrading ratio switch has been modified;
接收所述通知服务器发送的通知消息时,从所述redis缓存中读取所述降级比例开关,将所述降级比例开关存放到本地缓存中。When receiving the notification message sent by the notification server, read the downgrade ratio switch from the redis cache, and store the downgrade ratio switch in a local cache.
根据一些实施例,本发明还提供一种非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由装置的处理器执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。当存储介质中的指令由终端的处理器执行时,使得终端能够执行下述方法:获取包含访问信息的数据请求;根据所述访问信息和降级比例开关确定是否需要对所述数据请求进行降级;According to some embodiments, the present invention also provides a non-transitory computer-readable storage medium, such as a memory including instructions, which can be executed by a processor of a device to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like. When the instructions in the storage medium are executed by the processor of the terminal, the terminal can execute the following method: obtain a data request including access information; determine whether the data request needs to be downgraded according to the access information and a downgrade ratio switch;
若需要降级,则从兜底缓存中获取请求结果,若不需要降级,则根据所述数据请求获取实时数据。If downgrade is required, the request result is obtained from the pocket cache; if downgrade is not required, real-time data is obtained according to the data request.
本领域技术人员可以理解,附图只是示例实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的,因此不能用于限制本发明的保护范围。Those skilled in the art can understand that the drawings are only schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present invention, and thus cannot be used to limit the protection scope of the present invention.
本领域技术人员可以理解上述各模块可以按照实施例的描述分布于装置中,也可以进行相应变化唯一不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the above-mentioned modules can be distributed in the device according to the description of the embodiment, and corresponding changes can also be made in one or more devices that are only different from the embodiment. The modules in the above embodiments can be combined into one module, and can also be further split into multiple sub-modules.
以上具体地示出和描述了本发明的示例性实施例。应该理解,本发明不限于所公开的实施例,相反,本发明意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效布置。Exemplary embodiments of the present invention have been specifically shown and described above. It should be understood that the invention is not limited to the disclosed embodiments, but on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims (23)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710552124.4A CN107222567A (en) | 2017-07-07 | 2017-07-07 | Method, device and the service cluster of processing data request |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710552124.4A CN107222567A (en) | 2017-07-07 | 2017-07-07 | Method, device and the service cluster of processing data request |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107222567A true CN107222567A (en) | 2017-09-29 |
Family
ID=59952232
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710552124.4A Pending CN107222567A (en) | 2017-07-07 | 2017-07-07 | Method, device and the service cluster of processing data request |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107222567A (en) |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107862001A (en) * | 2017-10-23 | 2018-03-30 | 北京京东尚科信息技术有限公司 | A kind of method and system of data disaster tolerance |
| CN108123963A (en) * | 2018-01-19 | 2018-06-05 | 深圳市易仓科技有限公司 | The API auxiliary systems and processing method of a kind of cross-border electric business |
| CN108170411A (en) * | 2017-11-22 | 2018-06-15 | 链家网(北京)科技有限公司 | A kind of data middle layer system and its implementation |
| CN108366060A (en) * | 2018-02-07 | 2018-08-03 | 平安普惠企业管理有限公司 | Server access method, apparatus, equipment and computer readable storage medium |
| CN109450969A (en) * | 2018-09-27 | 2019-03-08 | 北京奇艺世纪科技有限公司 | The method, apparatus and server of data are obtained from third party's data source server |
| CN109831536A (en) * | 2019-03-22 | 2019-05-31 | 成都六四三六五科技有限公司 | A kind of front end load balancing service degradated system and method |
| CN110311975A (en) * | 2019-06-28 | 2019-10-08 | 北京奇艺世纪科技有限公司 | A kind of data request processing method and device |
| CN110334246A (en) * | 2019-07-08 | 2019-10-15 | 北京字节跳动网络技术有限公司 | A kind of data request processing method, apparatus, terminal device and storage medium |
| CN111245873A (en) * | 2018-11-28 | 2020-06-05 | 北京京东尚科信息技术有限公司 | Service downgrade method, apparatus, device and storage medium |
| CN111290804A (en) * | 2020-02-20 | 2020-06-16 | 广州市百果园信息技术有限公司 | A service configuration system and service configuration method, device and configuration server |
| CN111988387A (en) * | 2020-08-11 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Interface request processing method, device, server, equipment and storage medium |
| CN112235363A (en) * | 2020-09-28 | 2021-01-15 | 华云数据控股集团有限公司 | Data processing method, device, electronic device, storage medium and system |
| CN112433891A (en) * | 2020-12-02 | 2021-03-02 | 中国建设银行股份有限公司 | Data processing method and device and server |
| CN113886473A (en) * | 2021-08-30 | 2022-01-04 | 北京房江湖科技有限公司 | A method and device for providing service data |
| CN114610732A (en) * | 2022-03-09 | 2022-06-10 | 湖南快乐阳光互动娱乐传媒有限公司 | Bottom-pocketing data processing method and device |
| CN118092729A (en) * | 2024-04-28 | 2024-05-28 | 浙江锦智人工智能科技有限公司 | A microservice icon sharing method, device and medium based on micro front end |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103051706A (en) * | 2012-12-19 | 2013-04-17 | 新浪网技术(中国)有限公司 | Dynamic webpage request processing system and method for dynamic website |
| CN103475637A (en) * | 2013-04-24 | 2013-12-25 | 携程计算机技术(上海)有限公司 | Network access control method and system based on IP access behaviors |
| CN106341343A (en) * | 2016-09-14 | 2017-01-18 | 晶赞广告(上海)有限公司 | Automatic service degradation system and method thereof |
| CN106878472A (en) * | 2017-04-20 | 2017-06-20 | 广东马良行科技发展有限公司 | A kind of distributed type assemblies data service method and system |
-
2017
- 2017-07-07 CN CN201710552124.4A patent/CN107222567A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103051706A (en) * | 2012-12-19 | 2013-04-17 | 新浪网技术(中国)有限公司 | Dynamic webpage request processing system and method for dynamic website |
| CN103475637A (en) * | 2013-04-24 | 2013-12-25 | 携程计算机技术(上海)有限公司 | Network access control method and system based on IP access behaviors |
| CN106341343A (en) * | 2016-09-14 | 2017-01-18 | 晶赞广告(上海)有限公司 | Automatic service degradation system and method thereof |
| CN106878472A (en) * | 2017-04-20 | 2017-06-20 | 广东马良行科技发展有限公司 | A kind of distributed type assemblies data service method and system |
Non-Patent Citations (2)
| Title |
|---|
| 小飞鹤: "京东构建需求响应式亿级商品详情页技术分析", 《京东构建需求响应式亿级商品详情页技术分析》 * |
| 王张夫: "基于nginx 和redis 架构的高并发框架的设计与研究", 《信息通信》 * |
Cited By (23)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107862001A (en) * | 2017-10-23 | 2018-03-30 | 北京京东尚科信息技术有限公司 | A kind of method and system of data disaster tolerance |
| CN107862001B (en) * | 2017-10-23 | 2021-01-26 | 北京京东尚科信息技术有限公司 | Data disaster tolerance method and system |
| CN108170411B (en) * | 2017-11-22 | 2020-10-09 | 贝壳找房(北京)科技有限公司 | Data intermediate layer system and implementation method thereof |
| CN108170411A (en) * | 2017-11-22 | 2018-06-15 | 链家网(北京)科技有限公司 | A kind of data middle layer system and its implementation |
| CN108123963A (en) * | 2018-01-19 | 2018-06-05 | 深圳市易仓科技有限公司 | The API auxiliary systems and processing method of a kind of cross-border electric business |
| CN108366060A (en) * | 2018-02-07 | 2018-08-03 | 平安普惠企业管理有限公司 | Server access method, apparatus, equipment and computer readable storage medium |
| CN109450969A (en) * | 2018-09-27 | 2019-03-08 | 北京奇艺世纪科技有限公司 | The method, apparatus and server of data are obtained from third party's data source server |
| CN109450969B (en) * | 2018-09-27 | 2021-09-03 | 北京奇艺世纪科技有限公司 | Method and device for acquiring data from third-party data source server and server |
| CN111245873B (en) * | 2018-11-28 | 2023-09-05 | 北京京东尚科信息技术有限公司 | Service degradation method, device, equipment and storage medium |
| CN111245873A (en) * | 2018-11-28 | 2020-06-05 | 北京京东尚科信息技术有限公司 | Service downgrade method, apparatus, device and storage medium |
| CN109831536A (en) * | 2019-03-22 | 2019-05-31 | 成都六四三六五科技有限公司 | A kind of front end load balancing service degradated system and method |
| CN109831536B (en) * | 2019-03-22 | 2021-05-18 | 成都律图科技有限公司 | A system and method for degrading front-end load balancing services |
| CN110311975B (en) * | 2019-06-28 | 2022-06-03 | 北京奇艺世纪科技有限公司 | Data request processing method and device |
| CN110311975A (en) * | 2019-06-28 | 2019-10-08 | 北京奇艺世纪科技有限公司 | A kind of data request processing method and device |
| CN110334246A (en) * | 2019-07-08 | 2019-10-15 | 北京字节跳动网络技术有限公司 | A kind of data request processing method, apparatus, terminal device and storage medium |
| CN111290804A (en) * | 2020-02-20 | 2020-06-16 | 广州市百果园信息技术有限公司 | A service configuration system and service configuration method, device and configuration server |
| CN111988387A (en) * | 2020-08-11 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Interface request processing method, device, server, equipment and storage medium |
| CN112235363A (en) * | 2020-09-28 | 2021-01-15 | 华云数据控股集团有限公司 | Data processing method, device, electronic device, storage medium and system |
| CN112235363B (en) * | 2020-09-28 | 2022-02-01 | 华云数据控股集团有限公司 | Data processing method, device, electronic equipment, storage medium and system |
| CN112433891A (en) * | 2020-12-02 | 2021-03-02 | 中国建设银行股份有限公司 | Data processing method and device and server |
| CN113886473A (en) * | 2021-08-30 | 2022-01-04 | 北京房江湖科技有限公司 | A method and device for providing service data |
| CN114610732A (en) * | 2022-03-09 | 2022-06-10 | 湖南快乐阳光互动娱乐传媒有限公司 | Bottom-pocketing data processing method and device |
| CN118092729A (en) * | 2024-04-28 | 2024-05-28 | 浙江锦智人工智能科技有限公司 | A microservice icon sharing method, device and medium based on micro front end |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107222567A (en) | Method, device and the service cluster of processing data request | |
| US10104037B2 (en) | Method and system for network access request control | |
| US9148332B2 (en) | Content delivery network | |
| WO2019165665A1 (en) | Domain name resolution method, server and system | |
| US10491632B1 (en) | Methods for reducing compliance violations in mobile application management environments and devices thereof | |
| US9552326B2 (en) | Cache system and cache service providing method using network switch | |
| CN111684448B (en) | Enhanced online privacy | |
| US10567492B1 (en) | Methods for load balancing in a federated identity environment and devices thereof | |
| US20250220076A1 (en) | Domain name resolution request processing method and apparatus, and device, medium and program product | |
| US10135916B1 (en) | Integration of service scaling and external health checking systems | |
| WO2017215448A1 (en) | Cross-application data sharing method and web browser | |
| US20200004427A1 (en) | Method, apparatus and system for controlling mounting of file system | |
| CN113361913A (en) | Communication service arranging method, device, computer equipment and storage medium | |
| US20140344901A1 (en) | Method And System For Sharing A File | |
| US20150249636A1 (en) | Resource download method, service server and cellular phone client | |
| US20220255813A1 (en) | System and method to correlate end user experience with location | |
| WO2020088170A1 (en) | Domain name system configuration method and related apparatus | |
| WO2018071432A1 (en) | Information pushing | |
| AU2015266790A1 (en) | Providing router information according to a programmatic interface | |
| US8301837B1 (en) | Methods for providing a response and systems thereof | |
| US9602594B2 (en) | Processing requests | |
| US10122630B1 (en) | Methods for network traffic presteering and devices thereof | |
| CN114564504B (en) | Database access method and device, electronic equipment and storage medium | |
| CN115801677A (en) | Data transmission method and device, storage medium and electronic equipment | |
| CN107707373B (en) | A kind of dynamic resource access accelerated method based on API request |
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 |
Application publication date: 20170929 |
|
| RJ01 | Rejection of invention patent application after publication |