What is RPC?
Many people, many places, and many books have mentioned rpc. What is RPC?
RPC: Remote process call, which allows distributed applicationsProgramCall the available service mechanisms of different computers on the network. The RPC service registers a uuid in the registry, which is called a universal unique identifier. This UUID is unique for each service and is used on all platforms.
When an RPC service is started, it obtains a high port and registers the port with its UUID. Some RPC services randomly use the high port, some services use the same port whenever possible (if available ).
However, during the lifetime of the service, port allocation is static. When a client needs to communicate with a specific RPC service, it cannot know in advance which port the service is running on. Therefore, the client will first create a service on the server port, and then use the uuid of the requested service to query the port number from the service on the server port, the port er returns the corresponding port number to the client and closes the connection.
Finally, the client creates a connection to the service by using the port number provided by the port er.
Author kejiali