The source code of ribbon is relatively simple, and you can basically understand it after running a debug.
Ribbon is a client-side load balancer, that is, before the final call, you can use some rules to determine which instance to call.
The ribbon maintains a list of server instance information, and periodically refreshes the local ServerList, and then implements load balancing calls through certain logical roles