The API gateways can communicate directly with the service registry through the use of the SDK provided by the service registry or through the use of the APIs exposed by the service registry. This allows the API gateway to automatically fetch the correct location for a given service from the service registry.