Results 1 to 24 of 24

Thread: Mirroring Graphs To Reduce Load

  1. #1

    Lightbulb Mirroring Graphs To Reduce Load

    Everyone,

    I remember on 11/5 ronpaulgraphs.com got hammered from everyone wanting to look at the charts. I propose people volunteer mirroring.

    I wrote a simple script below that can be run on Unix or cygwin servers. This will download the daily graph every 5 minutes. Nothing fancy. I don't have a server at the moment that I can make public, but others feel free to use it. If you don't have wget you might try curl or lwp-download (perl).

    Please reply with a reply with a URL if you mirror so everyone knows. I propose a sticky.

    Commands to run:

    Code:
    $ nohup ./get_graph.sh &
    $ exit
    Keep in mind this will continue to run in the background until it is killed!! Leave out the nohup if you want it in the foreground.

    ------ script -----
    Code:
    #!/bin/bash
    
    # edit globals to your liking
    
    #PATH=$PATH:/usr/local/bin
    
    URL="http://www.ronpaulgraphs.com/yesterday_vs_today_line.png"
    IMG=`basename $URL`
    PUBLIC_HTML=/home/foobar/public_html
    WGET="wget -q -O $IMG.$$ $URL"
    CURL="curl -so $IMG.$$ $URL"
    
    cd $PUBLIC_HTML
    
    while [ 1 -eq 1 ]; do
    
            $WGET && mv $IMG.$$ $IMG || rm $IMG.$$ 2>/dev/null
    
            sleep 300
    done
    -- end

    PS: Maybe someone could attach some html that will refresh this image every 5 minutes.

    Edit: Added curl and error correction for wget/curl
    Last edited by Ronin; 12-15-2007 at 12:45 PM.



  2. Remove this section of ads by registering.
  3. #2
    Unfortunately, I think if I was to mirror, my poor site would use up all its bandwidth in an hour.

    Great idea though, with some caveats:
    More people have curl than wget installed, so you might want to provide a script for that.
    Don't alter other people's paths, it's impolite. If a Unix admin is installing this, they know where their own curl or wget is (even if they don't know how to use it) and can modify the script accordingly.
    Ambassador from The Wordforge

  4. #3
    Don't forget http://paulcash.slact.net/ !

    That's where I ended up going on 11/5 when http://www.ronpaulgraphs.com/ was overloaded...

  5. #4
    I have a small VPS I purchased to test things, I may try to get this up and running. THANKS!

  6. #5
    You can also download the firefox extension widget to monitor the donations.

    http://ok4ronpaul.ashlux.com/wiki/in...efox_Extension

  7. #6
    Hi, I've set up a mirror here: http://ronpaul.xnamatrix.com/

    Got plenty of bandwidth to spare I used crontab instead of a script since I'm not sure if my host allows stray processes running around.

  8. #7
    Quote Originally Posted by Kacela View Post
    Don't forget http://paulcash.slact.net/ !

    That's where I ended up going on 11/5 when http://www.ronpaulgraphs.com/ was overloaded...
    Personally, I like paulcash better for monitoring one day's donations. I like ronpaulgraphs for looking at trends over time.

  9. #8
    I just added the official widget and paulcash mirror too. Can't be too safe

    Mirror here: http://ronpaul.xnamatrix.com/



  10. Remove this section of ads by registering.
  11. #9
    I'm setting up a mirror right now.

    Maybe we should let Dan know once we have a few mirrors ready so that he can do round-robin dns for the main domain name. I'll post an update when I have a url ready.

    -Paul

  12. #10
    g'day. i'm the guy that runs paulcash. I've tested it through and through, and I'm 95% confident that i will have absolutely no trouble coping with the traffic.
    paulcash.slact.net
    donation graphs, rates, stats

  13. #11

    Thumbs up

    Quote Originally Posted by shell View Post
    g'day. i'm the guy that runs paulcash. I've tested it through and through, and I'm 95% confident that i will have absolutely no trouble coping with the traffic.
    great job ... i use it all the time

    kill the banks
    "It is from numberless diverse acts of courage and belief that human history is shaped. Each time a person stands up for an ideal, or acts to improve the lot of others, or strikes out against injustice, he sends forth a tiny ripple of hope, and crossing each other from a million different centers of energy and daring, those ripples build a current which can sweep down the mightiest walls of oppression and resistance." Robert Kennedy

    http://scully13.wordpress.com/about men of dark intentions

  14. #12
    Done...

    I'm running an exact mirror ("wget -kp http://www.ronpaulgraphs.com/") at http://justkidding.voteneocon.com.

    PM me if you have any creative ideas for the domain name voteneocon.com, which I am not using for anything other than this mirror at the moment.

  15. #13
    Quote Originally Posted by paulforpaul View Post
    Done...

    I'm running an exact mirror ("wget -kp http://www.ronpaulgraphs.com/") at [.
    Awesome! Maybe add the below flag to get just the *png images? That way you don't have to download each page? Not sure if that flag can be used with -kp though.

    -A, --accept=LIST comma-separated list of accepted extensions.

  16. #14
    At ~120 kb total for each time I update the mirror, it works out to be a grand total of 4.5 megabytes in bandwidth over 24 hours, at the rate I'm mirroring. I wrote Dan to make sure he's okay with the idea.

    [update] nevermind, it works out to substantially more than that. I'll look into ways to reduce the load. Thanks for the idea Ronin.
    Last edited by paulforpaul; 12-15-2007 at 06:38 PM.

  17. #15
    Hey guys... no need... I think everything is going to be fine.. I'm now on a dedicated server with unlimited access to bandwidth... I appreciate the thought, but mirroring is completely unnecessary. Like Leo I am 95%+ sure that there will be no interruption in service on the 16th.
    ---------------------------------------------
    fund raising graphs and stats!
    graphs: http://ronpaulgraphs.com/
    blog : http://ronpaulgraphs.blogspot.com/

  18. #16
    If you guys could watch my blog (see sig)... If I run into any problems, I will immediately post there...

    I really appreciate it!
    ---------------------------------------------
    fund raising graphs and stats!
    graphs: http://ronpaulgraphs.com/
    blog : http://ronpaulgraphs.blogspot.com/



  19. Remove this section of ads by registering.
  20. #17
    I'll be watching your blog, disabling my wget script, and doing a simple redirect from my URL to yours, just in case anyone tries to go there anyway.

    Thanks for running ronpaulgraphs.com!

  21. #18
    Sounds good, this is gonna be fun!

  22. #19

    Thumbs up Graph x-axis markers

    Quote Originally Posted by shell View Post
    g'day. i'm the guy that runs paulcash. I've tested it through and through, and I'm 95% confident that i will have absolutely no trouble coping with the traffic.
    Hey Shell,

    can you change the Q4 total graphs' x-axis markers to be like 1M, 2M,...10M and so instead of putting it as 10000 (in $1000 of dollars).

    I feel the 10'M' says it striaght without having to think about it twice.

    Thanks. Hope my suggestion will be taken.

  23. #20
    Quote Originally Posted by paulforpaul View Post

    Thanks for running ronpaulgraphs.com!
    +1000000

  24. #21

  25. #22
    Quote Originally Posted by chowda View Post
    Hey guys... no need... I think everything is going to be fine.. I'm now on a dedicated server with unlimited access to bandwidth... I appreciate the thought, but mirroring is completely unnecessary. Like Leo I am 95%+ sure that there will be no interruption in service on the 16th.
    hehe, I think we just crashed your server for a few seconds there Hopefully it's just a temporary spike rather than something you'll be struggling with throughout the day.

  26. #23

  27. #24



  28. Remove this section of ads by registering.


Similar Threads

  1. Get a load of this...!
    By Anti Federalist in forum U.S. Political News
    Replies: 0
    Last Post: 04-03-2011, 07:33 PM
  2. Replies: 17
    Last Post: 03-04-2011, 05:05 PM
  3. *** CLOSE the Paulcash and Graphs sites to easy server load on RonPaul2008.com***
    By georgia_tech_swagger in forum Grassroots Central
    Replies: 2
    Last Post: 12-16-2007, 10:23 PM
  4. Kucinich supporters mirroring money bomb (Dec 15)
    By JustAnotherV in forum U.S. Political News
    Replies: 9
    Last Post: 12-01-2007, 01:23 AM
  5. Get a load of this guy
    By jmarinara in forum U.S. Political News
    Replies: 1
    Last Post: 08-03-2007, 11:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •