We accelerate websites

15 days free trial Sign up

Media Acceleration Stream to the world

15 days free trial Sign up

Extensive Network Excellent world coverage

Using CDN with CloudFlare

Introduction

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.

Solution

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

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 )
    
 
 __   _     _____    ______     ______  
| || | ||  |  ___|| |      \\  /_   _// 
| '--' ||  | ||__   |  --  //   -| ||-  
| .--. ||  | ||__   |  --  \\   _| ||_  
|_|| |_||  |_____|| |______//  /_____// 
`-`  `-`   `-----`  `------`   `-----`  
                                        
Europe
  • Amsterdam
  • Baku
  • Bucharest
  • Budapest
  • Chelyabinsk
  • Dubai
  • Dublin
  • Frankfurt
  • Helsingborg
  • Helsinki
  • Istanbul
  • Khabarovsk
  • Kharkov
  • Kiev
  • Kungalv
  • Lisbon
  • London
  • Madrid
  • Milan
  • Odessa
  • Oslo
  • Paris
  • Polevskoy
  • Rostov-on-Don
  • Stockholm
  • Tel Aviv-Yafo
  • Trondheim
  • Zagreb
America
  • Arlington
  • Atlanta
  • Chicago
  • Dallas
  • Denver
  • Green Bay
  • Los Angeles
  • Miami
  • Montreal
  • New York
  • Phoenix
  • Portland
  • Provo
  • Queretaro
  • Reston
  • Sacramento
  • San Jose
  • Sao Paulo
  • Seattle
  • Toronto
  • Washington
Contact
  • e-mail: info@cdnsun.com
  • skype: cdnsun.com
  • phone: +1 844 300 9206
  • phone: +420 776 256 872
Blog Twitter LinkedIn Facebook CrunchBase Google+ / Google plus Foursquare Pinterest