Patent attributes
The disclosed embodiments disclose techniques for facilitating access to a remote cloud service via a cloud controller for a distributed filesystem. Two or more cloud controllers collectively manage distributed filesystem data that is stored in the cloud storage systems; the cloud controllers ensure data consistency for the stored data, and each cloud controller caches portions of the distributed filesystem. During operation, a cloud controller detects a request from a co-located client to access a network address that is in the same subnet of their local network. The cloud controller determines that the network address is associated with the remote cloud service (which executes in a cloud storage environment) and forwards the request to the remote cloud service.