Using CDN with CloudFlare
CloudFlare acts as a proxy between your visitors and your server (our servers if you are already using our CDN). CloudFlare appends cookies and custom expiry headers to your requests as in the example below.
curl -I mycompany.com HTTP/1.1 200 OK Server: cloudflare-nginx Date: Mon, 12 Mar 2013 12:29:32 GMT Content-Type: text/html; charset=utf-8 Connection: keep-alive Set-Cookie: __cfduid=d27bf7e957ca563b63f4619d8aba12c301395059372558; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.mycompany.com; HttpOnly
These cookies can negatively influence your CDN cache hit ratio.
The solution is simple, just set CDN service option Set-Cookie to Ignore. Please refer to Setting a Set-Cookie - ignore or accept for more details.
Differences between CloudFlare and Content Delivery Network (CDN)
CloudFlare acts as a proxy (forward proxy, client proxy) on behalf of the client.
( Client ↔ CloudFlare ) ↔ Server
Content Delivery Network (CDN)
Content Delivery Network (CDN) acts as a reverse proxy (server proxy) on behalf of the server.
Client ↔ ( CDN ↔ Server )