CN110198353B - System for releasing weight gray scale of service version - Google Patents

System for releasing weight gray scale of service version Download PDF

Info

Publication number
CN110198353B
CN110198353B CN201910465616.9A CN201910465616A CN110198353B CN 110198353 B CN110198353 B CN 110198353B CN 201910465616 A CN201910465616 A CN 201910465616A CN 110198353 B CN110198353 B CN 110198353B
Authority
CN
China
Prior art keywords
service
version
weight
service node
registry
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.)
Active
Application number
CN201910465616.9A
Other languages
Chinese (zh)
Other versions
CN110198353A (en
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201910465616.9A priority Critical patent/CN110198353B/en
Publication of CN110198353A publication Critical patent/CN110198353A/en
Application granted granted Critical
Publication of CN110198353B publication Critical patent/CN110198353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0859Retrieval of network configuration; Tracking network configuration history by keeping history of different configuration generations or by rolling back to previous configuration versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the field of distributed environment application version management, and discloses a system for weight gray release of a service version, which solves a version weight load service request which can be dynamically configured according to the service version, and realizes the load of the service version weight and the gray release service version. The invention comprises a registration center, a database and a service version weight management module; the registry provides a dynamic interface for modifying the service version weight information, and the service version weight management module calls the interface to dynamically modify the service version weight information; when the registry is started or restarted, all configured service version weight information is pulled from the database and stored in a service node list in the memory of the registry, so that a registered service consumer can acquire different weights of each service node with different versions corresponding to the service node list when pulling the service node list. The invention is suitable for the gray level release of the service version weight.

Description

System for releasing weight gray scale of service version
Technical Field
The invention relates to the field of version management in distributed environment application, in particular to version weight flow switching and gray level release.
Background
Under a complex distributed environment, the mutual calling among services is complex, the iteration speed of the service function is high, the functions provided by the services need to be added or modified continuously in the environment, and the smooth version switching and the quick rollback replacement are needed. One of the conventional gray level release schemes at present is based on the modification of a code level, different logics of different versions of services are called according to different users or parameters, and the scheme has strong code intrusiveness and no universality; another scheme is to switch traffic to different versions based on corresponding configuration performed by a traffic access layer (e.g., nginx), which requires external configuration and cannot load services of different versions according to a certain version weight.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the system for releasing the gray level of the weight of the service version solves the problem that a service request can be dynamically loaded according to the weight of the version configured by the service version, and the load of the weight of the service version and the gray level of the service version are released.
In order to solve the problems, the invention adopts the technical scheme that: the system for releasing the weight gray scale of the service version comprises a registration center, a database, a service version weight management module and a service consumer;
the registry provides an interface, and the service version weight management module calls the interface to dynamically modify the service version weight information; when the registry is started or restarted, all configured service version weight information is pulled from the database and stored in a service node list in a memory of the registry, so that a registered service consumer can acquire different weights of each service node with different versions corresponding to the service node list when pulling the service node list, wherein the service node list comprises the name, the node version number, the weight value and IP port information of the service node; meanwhile, when the registry provides different weights of different versions of service nodes for the service consumers, the registry also provides the SDK for version weight and gray level release control for the service consumers;
when a service consumer needs to call a service node, a specific service node in the service node list is selected according to different weights of different versions in the service node list and a version weight algorithm in the SDK for calling.
Further, the specific step of the service consumer invoking the service node includes:
adding the version weights of all service nodes in the service node list of the called service to obtain a total value Count;
dividing the version weight of each service node by the total value Count to obtain a percentage value;
and randomly taking a value of 0-100%, wherein the value is within the range of the percentage value of each node generated in the last step, and then taking the service node for calling.
The invention has the beneficial effects that: the invention can well solve the version weight load service request which can be dynamically configured according to the service version, almost has no invasion to the code and has strong universality.
Drawings
FIG. 1 is a block diagram of the embodiment;
FIG. 2 is a flow chart of the delivery of version weights;
FIG. 3 is a flow diagram of a service node invocation;
fig. 4 is a current limiting effect diagram of version weights.
Detailed Description
The invention abandons the conventional flow control and version gray level scheme in the whole thought, does not perform the flow control and gray level function of the version weight at the entrance of the service provider, but performs the version weight and gray level control of the called service on the real source of the flow, namely the service caller, namely each service caller loads the flow of the service provider according to the weight of the version, so that the whole version flow received by the service provider is the version flow controlled according to the version weight and gray level release rule configured by the service provider. The specific scheme of the invention is as follows:
this patent can make it receive and draw service version weight based on reforming transform the registry, and the registry after the transformation mainly possesses two functions:
1. the registry can automatically pull the version weight information of all configured services to the data center and store the version weight information into a memory of the registry, and expose an interface for modifying the version weight in real time, and when the service version weight changes, the service version weight management terminal can modify the service version weight in real time by calling the interface;
2. when pulling the service node list, the service consumer can obtain different weights of each service node with different versions corresponding to the service node list. The service node list may include a name, a node version number, a weight value, and IP port information of the service node.
In addition, when the registration center provides different weights of different versions of service nodes for the service consumer, the registration center also provides the SDK for version weight and gray level release control for the service consumer, and when the service consumer needs to call the service nodes, the registration center selects specific service nodes in the service node list according to different weights of different versions in the service node list and a version weight algorithm in the SDK to call so as to complete the functions of version weight control, gray level release and the like of the service provider.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following examples.
The embodiment provides a system for gray-scale release of service version weight, which comprises a registration center, a database, a service version weight management module and a service consumer, wherein the registration center is used for registering the service version weight;
the service version weight management module calls the interface to dynamically modify the service version weight information; when the registry is started or restarted, all configured service version weight information is pulled from the database and stored in a service node list in a memory of the registry, so that a registered service consumer can acquire different weights of each service node with different versions corresponding to the service node list when pulling the service node list, wherein the service node list comprises the name of a service node (service provider), a node version number, a weight value and IP port information; meanwhile, when the registry provides different weights of different versions of service nodes to the service consumers, the registry also provides the SDK for version weight and gray level release control to the service consumers.
One workflow of an embodiment is as follows:
step one, when the registry is started or restarted, the database is used for pulling all configured service version weight information and storing the information into a service node list in a memory of the registry, so that a registered service consumer can obtain different weights of each service node with different versions corresponding to the service node list when pulling the service node list. And the registry provides an interface capable of modifying the version weight information, and the interface is called to dynamically modify the version weight information when the service version weight management module modifies the version weight information.
The version information pulling and refreshing in the steps can also skip the registration center, and a service consumer can directly pull the version weight information related to the service node from the database. As shown in fig. 2, the embodiment loads the version weight information of the service node to the registry to improve the efficiency and real-time performance of pulling and refreshing the version weight information.
And step two, the service node starts to register in a registration center, and the registration center can pull the version weight information of the service node from the database once according to the name of the registered service node so as to ensure the real-time performance of the version weight information of the service node.
And step three, when the weights of different versions of the service node need to be adjusted or the gray release of a new version needs to be carried out, an interface of a registry is called through a service version weight management module, and different weight values of different versions of the service node are configured (the weight value of each version is 100% by default).
And step four, the service consumer can regularly pull a service node list of all services to be called from the registry and cache the service node list into a local cache of the registry, wherein the service node list comprises the name, the node version number, the weight value and the IP port information of the service node. When a service consumer calls a service node according to the name of the service node, the service consumer firstly inquires a corresponding service node list from a local cache, and when the cache does not have the corresponding service node list, all the service node lists corresponding to the name are pulled from the registry again.
Step five, the service consumer selects one service node for turning round according to different weights of different versions of the pulled service node and a weight load algorithm, wherein the algorithm mainly comprises the following steps: 1. adding the version weights of all service nodes in the service node list of the called service to obtain a total value Count; 2. dividing the version weight of each service node by the total value Count to obtain a percentage value; 3. and randomly taking a value of 0-100%, wherein the value is within the range of the percentage value of each node generated in the last step, and then taking the service node for calling.
In the fourth and fifth steps, as shown in fig. 3, when a service consumer wants to request a certain service node, the service consumer firstly goes to a local cache (the cached data can be obtained from the registry or directly from the configuration database) to query a service node list, and the list information is shown in fig. 3 and mainly includes the name, the node version number, the weight value and the IP port information of the service node. And the service consumer selects one node according to the version weight in the information and a version weight algorithm in the SDK to request a corresponding node interface in the service node.
And step six, if gray scale release is required, the version weight of the old version is only required to be configured into a value with a larger proportion, the version weight of the new version is configured into a weight with a smaller proportion, and the weight is added into a service node list of the registry. The service consumer can pull the version weight information of the new version, load a small flow to the new version according to the configuration, and after the function test of the new version of the service node is completed, configure the version weight of the old version to 0, so that all the flows can be switched to the new version, and the gray release function of the whole service version is completed.
In order to more intuitively embody the current limiting process of the version weight in the embodiment, refer to fig. 4, in which the weights of three different versions of the service node ServiceA, V-1.0.0, V-1.0.5, and V-2.0, are respectively configured as 0, 10, and 90. In the figure, the service consumers ConsumerA, ConsumerB, and ConsumerC are served to the service consumers. And the three respectively requested serviceAs all request the serviceA according to the configured version weight. The sum of the requested traffic received by the nodes of the different versions of ServiceA is the proportion of the traffic allocated according to the version weight configured by ServiceA. As shown in FIG. 4, the flow rate of the ServiceA version V-1.0.0 is 0, the flow rate of the speckle pattern V-1.0.5 is 10%, and the flow rate of the speckle pattern V-2.0.0 is 90%. Finally, the flow is distributed according to the version weight.

Claims (2)

1. The system for releasing the weight gray scale of the service version is characterized by comprising a registration center, a database, a service version weight management module and a service consumer;
the registry provides an interface, and the service version weight management module calls the interface to dynamically modify the service version weight information; when the registry is started or restarted, all configured service version weight information is pulled from the database and stored in a service node list in a memory of the registry, so that a registered service consumer can acquire different weights of each service node with different versions corresponding to the service node list when pulling the service node list, wherein the service node list comprises the name, the node version number, the weight value and IP port information of the service node; meanwhile, when the registry provides different weights of different versions of service nodes for the service consumers, the registry also provides the SDK for version weight and gray level release control for the service consumers;
when a service consumer needs to call a service node, a specific service node in the service node list is selected according to different weights of different versions in the service node list and a version weight algorithm in the SDK for calling.
2. The system for gray scale distribution of service version weights as claimed in claim 1, wherein the specific step of the service consumer invoking the service node comprises:
adding the version weights of all service nodes in the service node list of the called service to obtain a total value Count;
dividing the version weight of each service node by the total value Count to obtain a percentage value;
and randomly taking a value of 0-100%, wherein the value is within the range of the percentage value of each node generated in the last step, and then taking the service node for calling.
CN201910465616.9A 2019-05-30 2019-05-30 System for releasing weight gray scale of service version Active CN110198353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910465616.9A CN110198353B (en) 2019-05-30 2019-05-30 System for releasing weight gray scale of service version

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910465616.9A CN110198353B (en) 2019-05-30 2019-05-30 System for releasing weight gray scale of service version

Publications (2)

Publication Number Publication Date
CN110198353A CN110198353A (en) 2019-09-03
CN110198353B true CN110198353B (en) 2020-09-15

Family

ID=67753617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910465616.9A Active CN110198353B (en) 2019-05-30 2019-05-30 System for releasing weight gray scale of service version

Country Status (1)

Country Link
CN (1) CN110198353B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518119B (en) * 2021-05-25 2023-05-02 深圳壹账通智能科技有限公司 ABTest service distribution method, device, equipment and storage medium
CN113610637B (en) * 2021-08-12 2023-07-04 上海通联金融服务有限公司 Intelligent route publishing method under support of gray level algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243254A (en) * 2018-01-17 2018-07-03 平安科技(深圳)有限公司 Electronic device, the method and storage medium of the publication of application upgrade version
CN109597643A (en) * 2018-11-27 2019-04-09 平安科技(深圳)有限公司 Using gray scale dissemination method, device, electronic equipment and storage medium
CN109814910A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Automate gray scale dissemination method, device, computer system and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9955332B2 (en) * 2009-01-28 2018-04-24 Headwater Research Llc Method for child wireless device activation to subscriber account of a master wireless device
CN103176790B (en) * 2011-12-26 2016-04-20 阿里巴巴集团控股有限公司 Application dissemination method and system
CN103457870B (en) * 2013-09-25 2016-06-29 武汉理工大学 For the load balancing of distributed system and high availability subsystem and method
CN107197012B (en) * 2017-05-19 2020-03-31 焦点科技股份有限公司 Service publishing and monitoring system and method based on metadata management system
CN107391104B (en) * 2017-05-31 2021-06-01 杭州大搜车汽车服务有限公司 Client and reactive native code update dependence management method, device and system
CN109669719A (en) * 2018-09-26 2019-04-23 深圳壹账通智能科技有限公司 Using gray scale dissemination method, device, equipment and readable storage medium storing program for executing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108243254A (en) * 2018-01-17 2018-07-03 平安科技(深圳)有限公司 Electronic device, the method and storage medium of the publication of application upgrade version
CN109597643A (en) * 2018-11-27 2019-04-09 平安科技(深圳)有限公司 Using gray scale dissemination method, device, electronic equipment and storage medium
CN109814910A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Automate gray scale dissemination method, device, computer system and storage medium

Also Published As

Publication number Publication date
CN110198353A (en) 2019-09-03

Similar Documents

Publication Publication Date Title
CN112000348B (en) Control method, device and computer equipment for service gray level release
US8196125B2 (en) Optimization of policy enforcement
CN109213792A (en) Method, server-side, client, device and the readable storage medium storing program for executing of data processing
JP2020537449A (en) Service registration in communication network
JP6231020B2 (en) Coordinating processes in a cloud computing environment
US20080222057A1 (en) Method and apparatus for fusing context data
CN110198353B (en) System for releasing weight gray scale of service version
CN105159736B (en) A kind of construction method for the SaaS software deployment schemes for supporting performance evaluation
US20110264704A1 (en) Methods and Systems for Deleting Large Amounts of Data From a Multitenant Database
CN101645988B (en) Next-generation call center system and queuing method thereof
US8605589B2 (en) Dynamic classification and grouping of network traffic for service application
CN112015578B (en) Wind control system and method based on pre-synchronous processing and post-asynchronous processing
CN112953982B (en) Service processing method, service configuration method and related device
CN109818809A (en) Interactive voice response system and its data processing method and phone customer service system
US8341044B1 (en) System, method, and computer program product for rating and re-rating events
CN103516759A (en) Cloud system resource management method, cloud call center seat management method and cloud system
CN112579319A (en) Service calling method and device based on LRU Cache optimization
CN108205622A (en) The authority control method and device of a kind of application program for mobile terminal
CN116800825A (en) Calling method, device, equipment and medium based on micro-service splitting
CN107943423A (en) The management method and computer-readable recording medium of storage resource in cloud system
US8224933B2 (en) Method and apparatus for case-based service composition
CN104901998A (en) Integrated cloud service monitoring method
CN104580757A (en) Phone state sharing method and device
CN112631680A (en) Micro-service container scheduling system, method, device and computer equipment
CN114726919B (en) Gray scale flow control method, device, computer equipment and 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
GR01 Patent grant
GR01 Patent grant