Configuration center of. net distributed architecture,. net Architecture

Source: Internet
Author: User

Configuration center of. net distributed architecture,. net Architecture

Open source QQ group:. net open source basic service 238543768

Open Source Address: http://git.oschina.net/chejiangyi/Dyd.BaseService.ConfigManager

. Net unified configuration Center

It is used for unified configuration and centralized management of all projects, simplifies O & M and project deployment, and features high flexibility, high performance, high stability, and high timeliness.
At the same time, Server Load balancer and Failover are configured to achieve soft load balancing and Failover capabilities of the project.

1.High flexibility
A project can be freely combined or inherited from multiple categories. The same configuration item of multiple categories can be overwritten by the quilt classification configuration item.
(For example, project A can combine "Basic Database Configuration", "basic monitoring configuration", "Basic log configuration", and "project A configuration "; project A configuration can define its own special configurations and cover some basic configurations)

2.High Stability
By default, the sdk (client) saves all configuration "snapshots" of the project in "local". If the unified configuration center is abnormal, the sdk will obtain the configuration from the previous available "snapshot, obtain the latest version after the configuration center recovers.

3.High Performance
By default, the sdk caches the latest project configuration in the local memory. The configuration obtained by the sdk is obtained from the memory version.

4.High Timeliness
4.1 sdk (client) connects to the configuration center for the latest Configuration modification within the default heartbeat time.
4.2 web-side configuration modification: notify the relevant sdk to the configuration center for the latest modification through the third-party message-oriented middleware.
4.3 The web Client can restart the client of related categories/projects to reinitialize all configuration information.

5.Soft Load Balancing
You can manually configure a Server Load balancer configuration on the web end (you can configure different weights to hit different Server Load balancer configurations)
(To be automatic, write a task and mount it to "task scheduling" to dynamically adjust the Load Balancing Weight Based on the business situation. Refer to openapi Interface)

6.Soft failover
You can manually configure failover for a configuration on the web end.
(If you want to automate, write a task and mount it to "task scheduling". dynamically monitor the fault status of the current configuration based on the business situation, and then choose to use the backup fault configuration. Refer to openapi Interface)

Use demo

Using System; using System. collections. generic; using System. linq; using System. text; using XXF. baseService. configManager; // use the ConfigManager namespace Dyd. baseService. configManager. test {/** use demo */public class ConfigManagerDemo {// <summary> // initialize the basic configuration in the configuration center /// </summary> public void InitConfig () {XXF. common. XXFConfig. projectName = "projecttest"; // The name of the current project. config/web. config read X XF. common. XXFConfig. configManagerConnectString = "server = 192.168.17.111; Initial Catalog = dyd_bs_config; User ID = sa; Password = 123456;"; // The configuration center manages databases, project code configuration, or from the App. config/web. config read} // <summary> // use demo /// </summary> public void UseDemo () {/** configure to get priority * 1. from the local app. config, web. get * 2 in config first. obtain from the configuration center. */String configkey = "configkey1"; var value = ConfigManagerHelper. Get <string> (configkey); // Get the configuration value }}}

 

 

Part

 

 

By che jiangyi

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.