1. An apparatus comprising: a first virtual machine provided on a first local device of a plurality of local devices, wherein a portion of resources of the first local device are allocated to the first virtual machine; a virtualization software switch provided on the first local device configured to forward or redirect at least some traffic from the first local device to a WAN (Wide Area Network) optimization virtual appliance, the WAN optimization virtual appliance including at least the first virtual machine, a second virtual machine on a second local device of the plurality of local devices, and a distributed WAN optimization application running at least on the first and second virtual machines.