I read recently that using the Newest Nodes page bogs down the server. Do you think it might make sense to cache the newest nodes? Or is this already being done?

Replies are listed 'Best First'.
Re: Newest Nodes Page
by theorbtwo (Prior) on Feb 07, 2003 at 12:27 UTC

    Caching things is harder then it may appear. There's two web servers, and several dozen (most likely) httpd worker processes on each. Any update can go to any of them, and is then reflected on the DB server. It's difficult, then, to invalidate the cache intelegently, unless it's done on the DB server. If it's done on the DB server, which is very loaded, then it needs to be /very/ tight code, or it's not any better then intelegent use of the DB, which we already do.

    Also, we aren't set up very well for making modifications to, or additional code to run on, the DB server, because such code isn't nodes in Everything.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      What about just caching the newest nodes node on each webserver, automatically invalidating it after 60 seconds? You might still hit the DB once per webserver per minute, but if we have 200 people reloading the newest nodes node often, it'll still result in a lot less DB access.

      Does that make sense?

      -- zigdon

        *Which* Newest Nodes node? Your "newest nodes since" flag isn't the same as mine.

Re: Newest Nodes Page
by silent11 (Vicar) on Feb 07, 2003 at 17:46 UTC
    My solution: Tab Browsing

    I only hit the Newest Nodes page 3-5 times a day. Each time I do I open all the links I want to read in a new tab (using Mozilla). If you insist on being inefficient and don't like tab browsing just open up a new window for each thread. I then read all the different treads then go back to my newest nodes page and click the "I've read all these" button at the bottom.

    I do some real work for a while .... wait an hour or so ..... then repeat the process.

    Update: I also use mozilla's sidebar to host my cblast35. That way I'm not clicking the "talk" button every 30 seconds and causing several DB hits to load a new page when all I need is the cb. You can also strip down your side nodeletes to just those you can't live without.

    -Silent11