How to build microservices
Implement a request router that assigns each service request to a healthy instance using round-robin scheduling. Return None when the requested service has no healthy instances.
Use route_requests(services, requests), where services is a list of service objects containing a unique name and ordered instances, and each instance has an id and boolean healthy. Return a list containing the selected instance ID or None for each request.
def route_requests(services, requests):