Go Back   Pligg Forum > Announcements > Drawing Board
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 07:27 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,160
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
Thumbs up An idea to withstand Digg effect

Hi,

recently some of our client's sites were stormed by digg effect. I just struck with this idea - pls provide me directions that I can proceed on to getting a Digg resistant Pligg installations (to an extent - bandwidth outages cannot be solved - pls not in that direction )

The plan is this:
From Admin panel: Select a story that you see advancing to front page - generate HTML page (static content) of it, generate htaccess code to redirect the requested page to this new static page. The admin will then copy that static content and paste it into the htaccess - done.

Reason:
- Many sites (esp ones on shared hosts) die due to inadequate CPU share and memory
- most diggers will just come to see the content and they donot interact with the site anymore after initial viewing (if you have other links -they will just take that path) - all they know is to follow links.


Disadvantages:
- the comments will temporarily be disabled but can be allowed if user logged in - no redirection (dunno how difficult that will be)
- does not save bandwidth.


please suggest me some ideas or points to get started I will get a module on it sooner.

Regards.
Reply With Quote
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #2 (permalink)  
Old 06-13-2007, 10:01 AM
Simon Simon is offline
Innovator
 
Join Date: Mar 2006
Posts: 581
Downloads: 22
Uploads: 1
Thanks: 14
Thanked 126 Times in 61 Posts
Why not just re-direct to something like coral cache, like this wordpress plugin does:

http://elliottback.com/wp/archives/2...for-wordpress/

If a referral comes from a high traffic site like digg, it sends it to the cached version instead. You could do it on site, or re-direct to a pre-existing cache off site. Maybe even only activate the re-direct once a certain number of hits per minute are registered, or something of that nature.
__________________

Reply With Quote
  #3 (permalink)  
Old 06-13-2007, 11:52 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,160
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
There are disadvantages in redirecting to corel cache - esp if you monetize site with CPM advertisements
Reply With Quote
  #4 (permalink)  
Old 06-13-2007, 02:43 PM
Simon Simon is offline
Innovator
 
Join Date: Mar 2006
Posts: 581
Downloads: 22
Uploads: 1
Thanks: 14
Thanked 126 Times in 61 Posts
Yes, and there are disadvantages to every method in this situation.

If you are going to create a flexible module, it should really give the admin the choice. Either create a static html page on site, or re-direct to a pre-existing cache. Many shared servers *may* prefer the latter option. Just my 2 cents.
__________________

Reply With Quote
  #5 (permalink)  
Old 01-24-2008, 08:22 AM
xorsyst xorsyst is offline
New Pligger
Pligg Version: 9.9.0
Pligg Template: Custom
 
Join Date: Dec 2007
Posts: 12
Downloads: 4
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Stumbled upon this script just now. A generic script that redirects to Coral Cache. Figured it would help if anyone is still interested in this useful script.

mpwebwizard » Blog Archive » Using a mirror automatically for hits from popular websites

Quote:
To use this code, simply include it above all the PHP code in your website. You must make sure there is no output (including whitespace) otherwise the script will fail when it comes to redirection.
Code:
<?php

/** ************************** **/
/** COPYRIGHT MARTIN PORCHERON **/
/** ************************** **/

$sites	= Array(
		'digg.com',
		'slashdot.org',
		'reddit.com',
		'fark.com',
		'somethingawful.com',
		'kuro5hin.org',
		'engadget.com',
		'boingboing.net',
		'del.icio.us',
		'netscape.com'
		);
 
if (isset ($_SERVER['HTTP_REFERER']) && !strstr ($_SERVER['HTTP_USER_AGENT'], 'CoralWebPrx'))
{
	$referer = parse_url ($_SERVER['HTTP_REFERER']);
	$referer = $referer['host'];
	foreach ($sites as $site)
	{
		if (stristr ($referer['host'], $site))  
		{
			header ('Location: http://'. $_SERVER['HTTP_HOST'] .'.nyud.net:8080'. $_SERVER['REQUEST_URI']);
			exit;
		}
	}
	unset ($sites);
	unset ($referer);
	unset ($site);
}
?>

Last edited by xorsyst : 01-24-2008 at 08:27 AM.
Reply With Quote
The Following User Says Thank You to xorsyst For This Useful Post:
  #6 (permalink)  
Old 01-30-2008, 11:13 AM
Darksat Darksat is offline
New Pligger
Pligg Version: 9.9
Pligg Template: Default
 
Join Date: Jan 2008
Posts: 13
Downloads: 13
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Server caching
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
is "karma" idea flawed for niche pligg sites? please read... daveyc Suggestions 11 05-04-2008 09:12 AM
Summary length change doesn't take effect Iceburg Bug Report 5 01-28-2007 02:55 PM
Is this a bad idea boardsource My Pligg Site 1 11-28-2006 09:24 AM
Idea for scalable story promotion jvallery Core Development 6 04-18-2006 08:41 PM


LinkBacks Enabled by vBSEO 3.0.0