Overall architecture design drawing of NACOS
- Service management: service CRUD, domain name CRUD, service health status check, service weight management and other functions
- Configuration management: realize configuration tube CRUD, version management, gray management, monitoring management, push track, aggregation data and other functions
- Metadata management: Provides metadata CURD and marking capabilities
- Plug-in mechanism: three modules can be divided and combined to achieve the extension point SPI mechanism
- Event mechanism: realize asynchronous event notification, SDK data change asynchronous notification and other logic
- Log module: manages log classification, log level, log portability (especially to avoid conflicts), log format, exception code + help documents
- Callback mechanism: THE SDK notifies the data and calls the user back through a unified mode for processing. Interfaces and data structures need to be extensible
- Addressing mode: address IP, domain name, Nameserver, broadcast and other addressing modes, need to be extensible
- Push channel: Solve the performance problems of push between server and storage, between servers, and between server and SDK
- Capacity management: Manages the capacity of each tenant and each group to prevent storage write failures and affect service availability
- Traffic management: Controls the request frequency, number of long links, packet size, and request flow control according to tenants and groups
- Cache mechanism: Dr Directory, local cache, server cache mechanism. Tools are required for using Dr Directories
- Startup mode: Start different programs +UI in single-machine mode, configuration mode, service mode, DNS mode, or all mode
- Consistency protocol: different consistency mechanisms for different data and different consistency requirements
- Storage module: to solve the data persistent, non-persistent storage, solve the problem of data fragmentation
- Nameserver: Routes the namespace to clusterID and maps the user environment to the nacOS physical environment
- CMDB: solve metadata storage, docking problems with the three-party CMDB system, and solve the relationship between applications, people and resources
- Metrics: Expose the standard Metrics data, which is convenient to get through with the three-party monitoring system
- Trace: exposes the standard Trace, which facilitates communication with SLA system, log whiteness, track push and other capabilities, and can be connected with metering and billing system
- Access management: it is equivalent to the process of aliyun opening services and assigning identities, capacities and permissions
- User management: solve user management, login, SSO and other problems
- Authority management: solve identity identification, access control, role management and other problems
- Audit system: Extended interface to facilitate access to audit systems of different companies
- Notification system: core data change, or operation, convenient through SMS system, notification to the corresponding person data change
- OpenAPI: Expose standard Rest style HTTP interface, easy to use, convenient integration of multiple languages
- Console: Users can use the Console to manage services and configurations
- SDK: Multilingual SDK
- Agent: the DNS -f mode is similar, or it can be integrated with solutions such as mesh
- CLI: Command line lightweight product management, as easy to use as Git
Nacos set metadata in service details
import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.cloud.alibaba.nacos.ConditionalOnNacosDiscoveryEnabled; import org.springframework.cloud.alibaba.nacos.NacosDiscoveryProperties; import org.springframework.cloud.alibaba.nacos.discovery.NacosDiscoveryClient; import org.springframework.cloud.alibaba.nacos.discovery.NacosWatch; import org.springframework.cloud.client.CommonsClientAutoConfiguration; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; /** * When the nacOS client registers with the server, change the metadata in the service details. The metadata display service registration time * / @ Configuration @ ConditionalOnNacosDiscoveryEnabled @AutoConfigureBefore({SimpleDiscoveryClientAutoConfiguration.class, CommonsClientAutoConfiguration.class}) public class NacosDiscoveryClientAutoConfiguration { @Value("${spring.profiles.active}") public String profile; public NacosDiscoveryClientAutoConfiguration() { } @Bean @ConditionalOnMissingBean public NacosDiscoveryProperties nacosProperties() { return new NacosDiscoveryProperties(); } @Bean public DiscoveryClient nacosDiscoveryClient(NacosDiscoveryProperties discoveryProperties) { return new NacosDiscoveryClient(discoveryProperties); } @Bean @ConditionalOnMissingBean @ConditionalOnProperty(value = {"spring.cloud.nacos.discovery.watch.enabled"}, MatchIfMissing = true) public NacosWatch NacosWatch (NacosDiscoveryProperties NacosDiscoveryProperties) {// Delete all original metadata nacosDiscoveryProperties.setMetadata(new HashMap<>()); // Change metadata in service details, Increase the service registry time nacosDiscoveryProperties. For getMetadata () put (" new SimpleDateFormat (startup. Time ", "- dd yyyy - MM HH:mm:ss").format(new Date())); nacosDiscoveryProperties.getMetadata().put("spring.profiles.active",profile); return new NacosWatch(nacosDiscoveryProperties); }}Copy the code
Display effect:
See how metadata management should be designed through Yixin Wisdom:
Web address: www.esensoft.com/article/sho…
1. Data management platform functions
2. Metamodel management
3. Historical version of metamodel
4. Automatic collection
5. Collecting templates
6. Metadata management retrieval
7. Metadata management interface
8. Version comparison
9. Monitoring metadata change
10. Data maps
11. Blood ties
12. Impact analysis
13. Full link analysis
14. Meta-data association analysis
15. Attribute difference analysis
16. Self-service portal
17. Mof model standards
18. Open a stream data management platform
Uber launches Databook: Automatically collecting metadata and turning it into big data insights
eng.uber.com/databook/