Using Multisite with a CDN?

The easiest way to go would be to use an “Origin Pull” CDN. These sorts of delivery networks pull media directly from your site, cache it (usually for the TTL defined by your Cache related HTTP headers).

Any origin pull CDN will work fine with multi-site. You rewrite all static resource URLs in your content to the CDN, when the page loads, the resources are requested from the CDN. If the CDN does not have them, it goes and grabs them from your server, stores them, then serves them up.

I use Amazon CloudFront for this — It’s not free, but lasts month 430,000 and 3 GB of transfer cost roughly 80 cents.

The difficult part is just rewriting the static resource URLs in your pages to the CDN, which you can do fairly easily with output buffering and regex magic. Here’s an example I wrote and am using on several client sites — it was inspired by Mark Jaquith’s CDN plugin. Both of these should work fine with multisite, or you can roll your own — you should! its fun!

One caveat, I suppose, is that your server has to be configured correctly and send reasonable Cache related headers (Cache-Control, Expires, etc). ms-files.php is turned off WordPress 3.5 by default, and it sent some cache headers. Some origin pull CDNs will let you set custom expiration rules that ignore HTTP headers of the origin, however.