Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

Topic # 110909 18-Oct-2012 21:29
Send private message

I set up Cloudflare this evening, really just wanting to use it as a CDN to accelerate loading of static images on my website - I'm a photographer so there's a lot of them.

I set it up, and the Cloudflare control panel says it's working fine. DNS TTL is 10 minutes, so the DNS change to Cloudflare propogated really quickly. Cloudflare is set up as a basic CDN only, security basically off, minify off (already did that myself to the source files), rocket loader off. I've had problems with the site when I try to combine Javascript so I'm being cautious.

I set up a JMeter script to test the website before and after the change. I ran tests with various levels of caching, to try to emulate a web browser - 4 threads to load static resources, clear cache between runs, each run loads ten pages. In general, the page load time is the same or very slightly slower at around 3000ms including static resources.  This is true for all varieties of caching, on, or in between, but when all caching is off the page loads slightly faster on Cloudflare - 3500ms instead of 4100ms without.

I assumed it'd be faster, especially the first view, but also viewing pages that had new static resources.

Can anyone suggest what's going on, or anything to try to work out what's going on? I'd try to ping the Sydney Cloudflare server but I can't find an IP. The ping on the domain name and traceroute are basically the same.




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
Amanzi
783 posts

Ultimate Geek
+1 received by user: 44

Trusted
Subscriber

  Reply # 703226 18-Oct-2012 21:44
Send private message

Is your website hosted in NZ? If so, it would make sense that Cloudflare is slightly slower as you'd be retrieving the images from Sydney and not NZ.

BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber

  Reply # 703230 18-Oct-2012 21:54
Send private message

There are lots of options on CloudFlare. First make sure the images are in standard formats (jpg, png or gif). IF your server gives images in anything else (streaming, or loading from a script) then CloudFlare won't benefit at all.

If the images are loaded from standard IMG SRC tags then you might want to pay the $20 a month to get access to the image resizing, lazy loading, etc:



You might want to set Caching Level to "Aggresive".

Remember that you're adding hops here. When the browser requests the image it will send the request to SYD, which in turn will send back to your server. This adds up but only for the first request. After this they should have the images in their cache so it's not so bad.

I see cdn.geekzone.co.nz is 150ms from here, while our server is 30ms from here. Because most of our resources will be already cached then it's not much of an impact, but for new sites, or sites with not much traffic it may increase time to NZ viewers without much benefit for you.

Remember, CloudFlare purges the cached versions if not used, which means it won't save much bandwidth for you and actually increase page load times if your site is not busy and constantly pulling stuff out of their servers.

Is your site static? Let them do the minification, don't spend time yourself since they can do it automatically.

If you want, send me a PM and I can have a look on the site.




 
 
 
 




12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703322 19-Oct-2012 06:22
Send private message

My website's hosted in the US, with HostGator, ping's around 170ms. I figured if the content was served from Sydney with a 40ms ping the static resources should load faster overall, maybe not hugely, but at least a little. Though I guess pre-parsing of the page before it's completely in and multi threaded fetch probably mitigates this a little.

My site is powered by Wordpress, I have a performance plugin doing minification, object and page caching, etc. As a professional photographer/engineer I have saved my images at the level of size/quality I'd like, they're relatively small, so I don't want Cloudflare resampling them. I don't like lazy loading either, it really annoys me on websites I visit, plus the site uses CSS galleries so it's not simple IMG tags. The free plan has less options overall, I can't resample images if I wanted to. More gains may come from rocket loader and combining js/css, but that's caused problems in the past when the wordpress plugin did it.

I've turned the Cloudflare aggressive caching on, it's made page load times 30-40ms faster. Overall pages are reasonably quick, with a median/average of 1634/964ms now, but min 351ms and max 4832ms (max is page two of my blog with a lot of large images inline, which I'll probably change once testing has finished). Maybe I was just expecting too much. Testing was with JMeter with http caching enabled to emulate a browser, two threads and ten repetitions, the test hitting around eight pages and a few blog posts.

Re Cloudflare purging the cache if it's unused, that could be the case I guess. It got 4000 visitors and 19,000 pages last month, over 100K hits including static resources. It's quiet overnight NZ time, mostly search engines hit it. Traffic is 50% from NZ, 30% from the US, the rest from all over. I have customers from random parts of the world, people often come back to NZ to get married.

I've attached before/after testing results here. Sorry for the size, if I made them smaller it made then unreadable.

As an aside, I work as a performance architect for a large organisation. We focus more on scalibility of systems under high load than individual user response times, mostly because the back end systems are relatively slow. So I have some experience in this area, but not with public CDNs and such. My experience isn't all web either, it's partly web, partly rich client, partly web services, databases, etc. We do get tools like 1TB+ enterprize flash arrays, clustered databases, network acceleration hardware, etc.

I'll PM you thanks Mauricio, interested in thoughts and impressions :)




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber

  Reply # 703335 19-Oct-2012 07:31
Send private message

I had a look and replied with a simple question. Have you actually toggled Cloudflare On (is the site and www both with orange clouds or grey clouds)?

I am getting the site very fast, on TelstraClear, but coming directly from the US still.







12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703336 19-Oct-2012 07:34
Send private message

I must've set something up incorrectly. Cloudflare has the little green tick by the domain showing it's working. Inside the Cloudflare DNS setup it has a little orange cloud by the domains A and CNAME records, with a value of "points to 96.125.etc", which is the IP address of the USA server.

Can you spot what I'm doing wrong? I appreciate the help :)




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber

  Reply # 703338 19-Oct-2012 07:36
Send private message

Ok, I see it's on Cloudflare - it's TelstraClear giving me the old address still. I guess the NS was set at very high TTL.







12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703339 19-Oct-2012 07:38
Send private message

My DNS servers were set to a TTL of 600 (10 minutes), but I've had trouble with the TC name servers in the past not refreshing properly.

I'll give it a couple of days then try. Thanks for your help :)

As you may recall I live a couple of blocks from you. I should buy you a beer one day :)




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber

  Reply # 703342 19-Oct-2012 07:40
Send private message

I will have a look at little later when I get the proper DNS here. To start with I used this page to fetch the HTML and confirmed it's coming from Cloudflare.

The HTML comes very fast - under a second. The images received a 403 (Denied) though.

Also are you using some plugin in your site to prevent hotlink?




BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber



12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703347 19-Oct-2012 07:57
Send private message

Yes I use hotlink protection. I appreciate your help :)




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer




12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703354 19-Oct-2012 08:16
Send private message

I also seem to have broken my email, either a little or a lot - I'm not sure. Hopefully it's arriving and I can't check it, rather than having it not arrive.

When I log into the hostgator webmail it can't contact the IMAP server. I don't know if I can log into my email directly using IMAP as I'm not at home.

Is there something I need to do with DNS or MX records? Or could it be that HostGator just doesn't like that my DNS now points at Cloudflare and there's some kind of firewall in the way?




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber



12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703357 19-Oct-2012 08:24
Send private message

http://webmail.hostgator.com - . At home I just use IMAP from Thunderbird.

I've contacted HostGator support, which is typically excellent. I figured I'd post here as you have a bunch of Cloudflare experience.





AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


BDFL - Memuneh
58547 posts

Uber Geek
+1 received by user: 9962

Administrator
Trusted
Geekzone
Subscriber

  Reply # 703358 19-Oct-2012 08:25
Send private message


12910 posts

Uber Geek
+1 received by user: 2113

Trusted
Subscriber

  Reply # 703414 19-Oct-2012 10:32
Send private message

From HostGator.

Unfortunately webmail.hostgator.com will not work for domains that are currently are using Cloudflare's service. The reason for this is, that webmail attempts to connect to the server using wildphotography.co.nz, which in this case is not actually resolving to our servers but Cloudflare's servers.

You can still access access the regular webmail cPanel clients by using (another URL that doesn't work because it's on port 2xxx blocked by my work firewall).




AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

How Oppo shakes New Zealand’s phone market
Posted 22-Aug-2017 18:32


Recognition for top small business advisors
Posted 22-Aug-2017 17:23


OPPO R11 dual 20MP camera phone debuts in New Zealand
Posted 22-Aug-2017 15:45


Intel introduces new 8th Generation processors
Posted 21-Aug-2017 19:02


Trend Micro launches Home Network Security
Posted 21-Aug-2017 18:38


Avondale College students at top of Microsoft Office Specialist World Championship
Posted 21-Aug-2017 14:11


Garmin introduces inReach SE+ and inReach Explorer+
Posted 21-Aug-2017 14:05


Public Wi-Fi plus cloud file sharing
Posted 18-Aug-2017 11:20


D-Link NZ launches professional Wireless AC Wave 2 Access Point for businesses
Posted 17-Aug-2017 19:25


Garmin introduces the Rino 700 five-watt two-way handheld radio
Posted 17-Aug-2017 19:04


Garmin announces the Foretrex 601 and Foretrex 701 Ballistic Edition for outdoor and tactical use
Posted 17-Aug-2017 19:02


Brightstar announces new distribution partnership with Samsung Knox platform in Australia
Posted 17-Aug-2017 17:07


Free gig-enabled WiFi network extends across Dunedin
Posted 17-Aug-2017 17:04


Samsung expands with connect Gear S3 Frontier
Posted 17-Aug-2017 15:55


Fact-checking Southern Cross Next cable is fastest to USA
Posted 17-Aug-2017 13:57



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.