Updated on 2024-09-30 GMT+08:00

Application Logical Isolation

Application logical isolation is used in scenarios where different development environments share public CSE resources to reduce cost. Logical isolation is also used to manage the relationships between microservices. With proper isolation policies, the accessibility and permissions between microservices can be better controlled.

Service Discovery

Microservices in different service domains are isolated by applications.

Different service domains use different application names. Services in the same service domain can discover each other and access each other in point-to-point mode. Services in different service domains cannot discover each other. They need to access each other through Spring Cloud Gateway in the service domain where the microservice to be accessed is located.

Dynamic Configuration

Dynamic configuration is managed at the public, application, and service layers.

Application- and service-level configurations are applicable to simple scenarios. The application-level configuration is shared by all microservices of the application. The service-level configuration is exclusive and takes effect only for specific microservices. In complex scenarios, custom_tag and custom_value can be used to define configurations. For example, if some configurations are shared by all applications, this method can be used. Add the following configurations to the configuration file:
spring:
  cloud:
    servicecomb:
      config:
        kie:
          customLabel: public # The default value is public.
          customLabelValue: default # The default value is a null string.

If a configuration item has the public label and the label value is default, the configuration item takes effect for the microservice. The configuration center can be described as follows:

  1. The configuration center is considered as the table tbl_configurations of the database. The key is the primary key, and each label is an attribute.
  2. The client queries the configuration based on the following search criteria:
    • Custom configuration

      select * from tbl_configurations where custome_label=custome_label_value & withStrict=false

    • Application-level configuration

      select * from tbl_configurations where app=demo_app & environment=demo_environment & withStrict=true

    • Service-level configuration

      select * from tbl_configurations where app=demo_app & environment=demo_environment & service=demo_service & withStrict=true

    When withStrict is set to true, only the attributes specified in the condition are available. When withStrict is set to false, all attributes except those in the condition are allowed.

    You can also specify multiple applications for label app or services for label service. In this way, the configuration item takes effect for multiple services and applications.