Will apigee provide the ip of the caller via edns when doing a dns lookup and will it do this per customer ip or cache a single answer?

Our DNS servers do a table lookup on the customer's ip provided via edns to ensure closest datacenter to them. We want to preserve this behavior if we switch some of our domains to proxy through apigee. This will ensure some level of balancing between datacenters and will also ensure calls to different domains for a given customer will go to the same datacenter.

0 1 99
1 REPLY 1

The client subnet extension to EDNS is added by the recursive resolver, not the DNS client (see https://tools.ietf.org/html/rfc7871#section-7.1 ). Thus, the IP cannot be added by the Apigee message processors, and any client subnet information that was added by the recursive resolver would be based on the message processor IP, and not the API client IP.

If you're trying to load balance purely for speed, this actually makes sense as it avoids a 'horseshoe' type situation where the MP hits a data center close to the API client but far away from itself, thus adding to latency.

On the other hand, if you have something more complex like location-based data sharding, then you'll likely want to translate your table into Apigee (eg, a kvm) and set the target.url variable manually to force routing to a specific region based on the API client IP address.