Artemis Registry Introduction

Equivalent to zookeeper in dubbo

1 Architecture Diagram

share picture2 Server(application service)

  • Artemis RegistryClient will first Clear the instance information in the Artemis service.
  • Register: The server performs its own health monitoring mechanism. After the detection is passed, the Artemis Client will register the service to Artemis.
  • UnRegister: The server process Upon termination, an UnRegister request will be sent to Artemis service to deregister instance information.
  • HeartBeat: Artemis RegistryClient maintains the heartbeat between Artemis Service and Artemis Service and reports it every 5 seconds.
  • Artemis: If Artemis RegistryClient does not report a heartbeat within a certain period of time, Artemis will think that the instance has been terminated, set the instance status to Down, and push the instance status change to the client.
  • Artemis Client and Artemis Service Establish a Socket connection, the default TTL time is 5 minutes, and it needs to re-establish a connection with the server every 5 minutes to ensure load balancing and DR switching.

3 Client (application client)

  • The application client constructs the ServiceKey according to the service name and namespace.
  • Pull: Artemis DiscoveryClient from the cache Get the Service Context, if there is a miss in the cache, it will be based on ServiceKey initiates a remote Http request to synchronize service information from Artemis Service, such as instances, routing rules, and other information.
  • Push: When the instance in Artemis Service changes (pull in, pull out, instance termination), it will tell Artemis DisocveryClient through ServiceChangeListener and update the client cache.
  • The routing table of the Artemis Service address will be synchronized every 15 minutes.

4 Artemis service

  • For newly expanded machines, Artemis service will be every 5 minutes Fully synchronize CMS application and server data, check the relationship between AppId and IP, and then push it to the client, with a delay of about 10 minutes.

Leave a Comment

Your email address will not be published.