ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How to do EE as static pages?

March 18, 2011 8:04pm

Subscribe [2]
  • #1 / Mar 18, 2011 8:04pm

    grrramps

    2219 posts

    What are the better methods for creating static HTML pages in EE?

    We manage a few EE sites that suffer from growing traffic, which puts a strain on server resources. So, we’re looking for a way to generate static HTML pages in EE (vs. dynamic, PHP and MySQL generated pages) to be served. I’ve looked briefly at SolSpace’s Static Page Caching, which has some potential as a solution.

  • #2 / Mar 18, 2011 9:35pm

    handyman

    509 posts

    Interesting topic….
    Are you saying that just taking the source of a rendered page and maybe making slight changes would not work?

    All spiders and search engines - as well as the wayback machine, etc. effectively capture the rendered page - which seems like what you want to do…..

    One of my potential future projects involves doing this for people who want their sites to go on after they are gone! I suspect it is relatively easy - even IE used to have a built-in utility for downloading web pages “x” levels down.

    I suspect one big problem is the naming conventions!

    My basic advice - which I base on a very recent experience - is that upgrading the server and serving dynamically is the better way to go. Any site with traffic that heavy should be able to afford the basic upgrades in service!

    In my case, I am spending about 20% more per month, and my page load times went down by a factor of 5 to 10X. Sure, static pages MIGHT be quicker, but actually I have some relatively static pages which are still slow…since they pull in google ads, a google search box, etc…...

    So, all in all, unless it is a REALLY special case, I think throwing hardware and optimization at it is the best deal going….

  • #3 / Mar 18, 2011 9:59pm

    grrramps

    2219 posts

    Are you saying that just taking the source of a rendered page and maybe making slight changes would not work?

    The object would be to render static pages to reduce server load (PHP and MySQL, specifically), thereby, increasing the speed at which a page is delivered by Apache.

    I’m not complaining about EE’s ability to cache. It’s awesome. But a Digg hit or a SlashDot hit or a Fireball hit tends to slow down many servers where the site is served dynamically (Apache, PHP, MySQL).

    All spiders and search engines - as well as the wayback machine, etc. effectively capture the rendered page - which seems like what you want to do…..

    Yeah, the static page should have the same URL as the dynamic page, hence a solution probably mucks with .htaccess, too.

    My basic advice - which I base on a very recent experience - is that upgrading the server and serving dynamically is the better way to go. Any site with traffic that heavy should be able to afford the basic upgrades in service!

    Life should be that easy.

    The problem has to do more with spikes (above) in traffic and how to handle them without bringing a site down. WordPress sites have this problem regularly (Digged, Slashdotted, Fireballed) but a couple of very good caching plugins which render content as static files work wonders to mitigate frequent spikes in traffic.

    In my case, I am spending about 20% more per month, and my page load times went down by a factor of 5 to 10X. Sure, static pages MIGHT be quicker, but actually I have some relatively static pages which are still slow…since they pull in google ads, a google search box, etc.

    Yeah, I avoid the hosts which feature unlimited storage and unlimited bandwidth for $4.99 a month. But even more robust hardware can see server problems when traffic increases by an order of magnitude or two.

    I think throwing hardware and optimization at it is the best deal going…

    Sys admins probably love that solution. Average EE clients don’t share the same sentiment. If the traffic is constantly high then the entire business model changes, which justifies a more robust hardware solution. It’s the unpredictable spikes I seek to conquer.

    SolSpace’s Static Page Caching seems to be going in the right direction, though I see some limitation in workflow management (needs to be automated to produce static pages for dynamic pages which start to get a heavier hit load).

  • #4 / Mar 18, 2011 10:22pm

    handyman

    509 posts

    Doesn’t Apache do a lot of page caches in RAM anyway?
    http://httpd.apache.org/docs/trunk/mod/mod_cache.html

    Someday, we will all solve this the easy way with traffic-cost dependent sites on Amazon cloud, etc…....which would be ideal.  Pay for what you use…....

    I never have to deal with unforeseen spikes - that is, they are seasonal and are weather related, etc. but I rarely see any total site traffic more than 10-40% above what is expected. Orders of magnitude or two of ‘em have to be a completely different thing!

    I looked at solspaces thing also, but it does not work on the forums which were the main source of my heavier traffic.

  • #5 / Mar 18, 2011 10:45pm

    grrramps

    2219 posts

    Doesn’t Apache do a lot of page caches in RAM anyway?
    http://httpd.apache.org/docs/trunk/mod/mod_cache.html

    Possibly, under specific configurations, but probably not EE pages.

    I’m more concerned about delivery of entries than other page assets. Pseudo CDNs are easy enough to set up for other static assets (CSS, Javascript, images, etc.)

    Someday, we will all solve this the easy way with traffic-cost dependent sites on Amazon cloud, etc…....which would be ideal.  Pay for what you use.

    Not there yet, obviously. Flesh out Amazon’s cost structure and it’s not a bargain for the typical small to mid-range site—either on storage or bandwidth or database access. Shared hosts and VPS setups are less expensive, but they’re the ones with the problem handling spikes.

    Orders of magnitude or two of ‘em have to be a completely different thing!

    They’re exciting, for sure.

    I looked at solspaces thing also, but it does not work on the forums which were the main source of my heavier traffic.

    I’d suspect that forums, being completely dynamic, would require the more expensive hardware solution. I have one EE site that gets occasional spikes of tenfold. The resource issue can be mitigated somewhat by removing Javascript and CSS from the EE installation. Ditto for images (all can be moved, for example, to Amazon S3 as a psuedo CDN). That leaves the HTML rendered by all the associated PHP and MySQL alone.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases