Use SOFARegistry with SOFARPC

更新时间:
复制 MD 格式

SOFARegistry is a service registry and an underlying component of the SOFA middleware.

It stores the following information:

  • Service provider addresses

  • Service consumer subscriptions

It works as follows:

  • It establishes persistent connections with both service consumers and service providers.

  • It dynamically detects changes in published service addresses and notifies consumers.

SOFARPC requires SOFARegistry, the service registry, when it uses a software load balancing routing policy.

Software load balancing is a client-side routing method. To call a service, the consumer uses a software load balancing policy to select an address from a list. This list is pushed by SOFARegistry and stored in the local cache. The consumer then calls the service at the selected address.

SOFARPC uses a ServicePublish and ServiceReference model. Through SOFARegistry, SOFARPC dynamically detects service publications and pushes a list of service addresses to consumers that reference the service. This process updates the list of active services in the consumer's local cache. Finally, a software load balancing policy selects an active address for the consumer to use for remote communication.

When using SOFARPC with a service registry, configure the address in the configuration file.

Diagram of SOFARPC using SOFARegistry

软负载示意图