If that entry is present Hydra will ignore the serviceIP field. This feature will be useful where hydra-enabled services are load balanced by and external load balancer such as NginX or Docker swarm orchestration.
The algorithm that hydra used to load balance requests using hydra.makeAPIRequest (also used by Hydra-router!) worked by looking at available service instances and sorting them based on when they most recently updated their presence and selecting the top entry. The idea there was that services that recently reported health are less likely to be busy. Upon testing we found that this leads to an uneven distribution of request across available services and thus the underutilization of server resources. The load balancing algorithm has been changed to use a basic round robin. Hydra now retrieves active service instances and performs an array shuffle. The resulting service list is then used in a round robin fashion if the first service entry on the list fails the next on is tried - if all fail an HTTP 503 is returned
Hydra serverRequest and makeAPIRequest now has a default timeout of 30 seconds up from the earlier 5 seconds timeout. The value can be overwritten by setting the header or UMF timeout value.
Service instanceID is no longer calculated as a hash of IP and Port address. Now, instanceID is simply a random UUID. This change is necessary to support the new DNS usage where a serverIP won't be specified in the service configuration.
serviceDNS
entry to the hydra branch of your service configuration.If that entry is present Hydra will ignore the serviceIP field. This feature will be useful where hydra-enabled services are load balanced by and external load balancer such as NginX or Docker swarm orchestration.
The algorithm that hydra used to load balance requests using hydra.makeAPIRequest (also used by Hydra-router!) worked by looking at available service instances and sorting them based on when they most recently updated their presence and selecting the top entry. The idea there was that services that recently reported health are less likely to be busy. Upon testing we found that this leads to an uneven distribution of request across available services and thus the underutilization of server resources. The load balancing algorithm has been changed to use a basic round robin. Hydra now retrieves active service instances and performs an array shuffle. The resulting service list is then used in a round robin fashion if the first service entry on the list fails the next on is tried - if all fail an HTTP 503 is returned
Hydra serverRequest and makeAPIRequest now has a default timeout of 30 seconds up from the earlier 5 seconds timeout. The value can be overwritten by setting the header or UMF timeout value.
Service instanceID is no longer calculated as a hash of IP and Port address. Now, instanceID is simply a random UUID. This change is necessary to support the new DNS usage where a serverIP won't be specified in the service configuration.