Current time: 12-16-2017, 06:01 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to run ENTIRE site (not just images, etc) via CDN?
03-25-2012, 01:55 AM
Post: #61
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
Well, I'm also making some progress again.

I'm happy to report that I've figured out how I can put our whole site on a CDN and have better caching.

It is a combination of HTTP-rules, Server Side Includes (SSI) and caching the right URLs.

Now if only I could find a CDN with HTTP-rules for an affordable price as our site is only a hobby project. Undecided

I've also got in contact with a Highwinds reseller, maybe they can offer me what I want/need.

It will probably take some time to change the site, but I think it will be worth it. In the meantime I can cache more and nginx can help serve the site faster.

I'm trying to get it to work as well as the Marvin's site. But I have a lot of content which is constantly changing. It should be possible to get the first page view downloaded from the CDN as a whole.

Atleast if the HTML is cached and even if it is not, I could setup nodes per region to generate the content as well.

Lots of work to do, I'll keep you folks posted.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-25-2012, 02:10 AM
Post: #62
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
Lennie, do you know if CDN77, the new kid on the block, offers http rules which would let you do it?

Marvin
Find all posts by this user
Quote this message in a reply
03-25-2012, 02:42 AM (This post was last modified: 03-25-2012 02:55 AM by Lennie.)
Post: #63
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
Very much doubt it and especially not currently. CDN77 has only started this month to put up their website. The basic things in the control panel is now mostly usable.

Have a look at the documentation of the software that is used:

http://help.aflexi.net/ (maybe there are slightly differences between OnApp which CDN77 uses and Aflexi but doubt it)

I think it is meant for handling static files.

The webserver software is nginx, here is the documentation of that:

http://wiki.nginx.org/Modules

Especially the proxy/cache module:
http://wiki.nginx.org/HttpProxyModule

And extra backend control headers:
http://wiki.nginx.org/X-accel

I asked support if the X-Accel-Expires was supported, but they didn't tell me it was.

I tried two CDN POPs Amsterdam, NL and Raleigh, US and in both cases X-Accel-Expires did work to control the caching behaviour on the proxy from the server. Still that isn't even close to the same as HTTP-rules of course (!)

There is even an example how nginx needs to be configured to do what you want:

http://wiki.nginx.org/HttpProxyModule#proxy_no_cache

But it doesn't work because something like that doesn't belong in the default configuration of nginx.

Some documentation I found on one of both sites mentioned:
https://code.google.com/p/ncache/

But that seems kind of silly to me, if they are then they are running an old version of nginx or just use that to make it easy to explain to people how efficient it is.

Something else that caught my eye:

"By default, the content expiry of all resources is set to 60 minutes, and it can be changed."

I don't know if it is the expire time for the browser or the CDN POP cache, if it is the later that would kind of defeat the purpose of a CDN.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-15-2012, 09:36 AM
Post: #64
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
(03-25-2012 02:42 AM)Lennie Wrote:  Very much doubt it and especially not currently. CDN77 has only started this month to put up their website. The basic things in the control panel is now mostly usable.

Have a look at the documentation of the software that is used:

http://help.aflexi.net/ (maybe there are slightly differences between OnApp which CDN77 uses and Aflexi but doubt it)

I think it is meant for handling static files.

The webserver software is nginx, here is the documentation of that:

http://wiki.nginx.org/Modules

Especially the proxy/cache module:
http://wiki.nginx.org/HttpProxyModule

And extra backend control headers:
http://wiki.nginx.org/X-accel

I asked support if the X-Accel-Expires was supported, but they didn't tell me it was.

I tried two CDN POPs Amsterdam, NL and Raleigh, US and in both cases X-Accel-Expires did work to control the caching behaviour on the proxy from the server. Still that isn't even close to the same as HTTP-rules of course (!)

There is even an example how nginx needs to be configured to do what you want:

http://wiki.nginx.org/HttpProxyModule#proxy_no_cache

But it doesn't work because something like that doesn't belong in the default configuration of nginx.

Some documentation I found on one of both sites mentioned:
https://code.google.com/p/ncache/

But that seems kind of silly to me, if they are then they are running an old version of nginx or just use that to make it easy to explain to people how efficient it is.

Something else that caught my eye:

"By default, the content expiry of all resources is set to 60 minutes, and it can be changed."

I don't know if it is the expire time for the browser or the CDN POP cache, if it is the later that would kind of defeat the purpose of a CDN.

As far as I'm concerned, you can set force cache on all your files @ your origin to 'never expire' and the edge servers will obey that.

That's only recommended on a full site cache if you do not run any dynamic content or rarely updated contents. Else you need to purge it manually to get new content into the CDN.
Find all posts by this user
Quote this message in a reply
09-26-2012, 11:01 PM
Post: #65
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
I've been busy thinking about this problem for a while now and I've figure out it might be much simpeler to just use a cookie-path when setting cookies for sessions and so on.

So certain pages would not be cached, but other HTML can just be cached.

So / can be cached at the CDN for first time visitors, but URL's starting with /c/ would get a session-cookie with a path: /c/

So when you want someone to login to a forum the forum would be at:

/c/forum/

http://curl.haxx.se/rfc/cookie_spec.html

Also Amazon can handle these kinds of things much better now:
http://aws.typepad.com/aws/2012/09/amazo...-more.html
Visit this user's website Find all posts by this user
Quote this message in a reply
10-17-2013, 07:39 PM
Post: #66
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
Amazon/AWS CloudFront just added support for POST, etc. this makes it a lot easier to cache the entire site:
http://aws.typepad.com/aws/2013/10/amazo...thods.html

I hope I'll have some time to do some testing soon.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)