SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast kingjacob's Avatar
    Join Date
    Apr 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Methods to Cut Bandwidth use in PHP Proxy?

    I am literally dying from my proxy using too much bandwidth and I believe its from downloads, how do I set it up to only allow downloads of a certain size like 500kb or set a per ip bandwidth limit? If there are other techniques to save bandwidth Im interested in those to.

    Heres the AwStats:
    24 Aug 2007 9450 51357 51750 40.55 GB
    25 Aug 2007 3107 27266 27581 8.41 GB
    26 Aug 2007 4895 22241 22451 21.27 GB

    Im not actually getting all the visitors it says Im getting not by a long shot, otherwise Id just buy more bandwidth,but AwStats doesnt read proxies correctly.

  2. #2
    SitePoint Addict Wildhoney's Avatar
    Join Date
    Apr 2006
    Location
    Nottingham
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Save any images it downloads in low colour. This will increase CPU cycles but reduce bandwidth. Weigh up the pros and cons. Whatever you are going to do, it's probably going to have unfavorable consequences for the end-user. Personally I would attempt to increase my ROI by thinking up some new ideas for proxies. But proxies are really a dead-end project, hence why I've never, ever considered having one.
    TalkPHP.com - The Friendly PHP Community

    Watch Reaper Online - Watch Chuck Online

  3. #3
    SitePoint Enthusiast kingjacob's Avatar
    Join Date
    Apr 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wildhoney View Post
    Save any images it downloads in low colour. This will increase CPU cycles but reduce bandwidth. Weigh up the pros and cons. Whatever you are going to do, it's probably going to have unfavorable consequences for the end-user. Personally I would attempt to increase my ROI by thinking up some new ideas for proxies. But proxies are really a dead-end project, hence why I've never, ever considered having one.
    Do you mean save images on that users browse on my server as a sort of cache, would that reduce bandwidth?

    Proxies may have short lifes but running ones forced me out of my css/html bubble and into php and server sdministration so its good plus, they make good money.

  4. #4
    SitePoint Addict Wildhoney's Avatar
    Join Date
    Apr 2006
    Location
    Nottingham
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All depends what you would consider good money. I wouldn't consider it good and that's before bandwidth bills. As for the images, check if the site has been downloaded previously, if so, use those images. Can also download the images from the external servers and save them in low colour. Thus:

    [ External Server ] -> High Bandwidth -> [ Your Server ] -> Medium Bandwidth -> [ Client ]
    TalkPHP.com - The Friendly PHP Community

    Watch Reaper Online - Watch Chuck Online

  5. #5
    SitePoint Enthusiast kingjacob's Avatar
    Join Date
    Apr 2007
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Wildhoney View Post
    All depends what you would consider good money. I wouldn't consider it good and that's before bandwidth bills. As for the images, check if the site has been downloaded previously, if so, use those images. Can also download the images from the external servers and save them in low colour. Thus:

    [ External Server ] -> High Bandwidth -> [ Your Server ] -> Medium Bandwidth -> [ Client ]
    Im sorry I thought I knew what you meant but now you lost me, the entire proxy website including files is saved on my dedicated box. The index(header/background images) itself is only 7.67kb, the high bandwidth cost is from users downloading movies through my proxy. I am just wondering if there is any simple way to limit per ip bandwidth usage within phproxy itself. Mittineague introduced me to http_flood control and Im curious if their is something like that but with a gui.

  6. #6
    SitePoint Addict Wildhoney's Avatar
    Join Date
    Apr 2006
    Location
    Nottingham
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm no proxy expert, as aforementioned I've never owned a proxy in my life. All I can offer you is a general common-sense when it comes to bandwidth issues. If you find yourself a competent PHP coder, he or she will quite easily be able to implement the features you are seeking.
    TalkPHP.com - The Friendly PHP Community

    Watch Reaper Online - Watch Chuck Online


Bookmarks

Posting Permissions

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