Sunday, December 16, 2007

The Flash widget

I've received a few requests to take down the flash widget to conserver RP08's bandwidth.
Thing is, it's only 100KB that their server can spit out with no preprocessing. What's more, once a browser downloaded it, it'll stay in the cache, so it mostly won't get requested again.
Additionally, the widget checks a URL with some data on the RP server every 30 seconds or so. This data feed has an average response time of 150 ms, and isn't in any way measurably affecting the campaign servers.

What's slowing down RP08.com, in my estimation, is the direct visits and the processing involved with donations and credit card processing.

...but if someone from rp08.com asks me to take it off, it'll be gone immediately.

23 comments:

Ben Rogers said...

The bandwidth for you to host that banner is insignificant compared to the volume of contributions pouring in. Please keep it up. It is keeping me off RP's site so that I don't contribute to the bandwidth issue by visiting his site all the time.

Ben Rogers
St. Peters, MO

A.B. Dada said...

I'd love to see a "hide" checkbox on it, since I browse your site from my cell phone (which supports flash) so periodically checking the site for me takes about 90 seconds for the widget to re-render.

I'm going to guess I'm one of about 3 people who browse the site from a cell phone :)

Unknown said...

The issue isn't the banner. The issue is that every 30 seconds the banner must send/retrieve an update from the official totals containing the new total and an entire list of donors names and addresses.

Worse, that banner is open in so many places that one computer easily gets updated several times. Multiply that by the 80,000 people or so watching this event.

Dave said...

I'm with lee on this one.

The banner needs to asynchronously poll the server every 30 seconds and each time it does that it needs to download the associated data (which can be quite large considering the amount of donations per minute).

My guess is that the RP08 site is having trouble handling all of the simultaneous incoming connections. I don't think that bandwidth is the issue here.

Having said all of that, the banner is in so many places that I removing it from your site probably wont make a whole lot of difference.

Anonymous said...

I'm with lee and dave. Just replace the banner with the current total, which gets refreshed whenever the rest of your data does (i.e. once every 10 minutes vs every 30 seconds).

Thanks for putting this site together - great resource for those of us out-of-country.

Ben Rogers said...

Lee is wrong.

When the widget updates, it asks for a small set of data, essentially, a number. The widget then processes that number. You're sending a few bytes at most. It's a blip.

It is not a significant drain in any way on the RP08 site. None whatsoever. That's why widgets were made, so they could supply useful information to lots and lots of places, over and over again without placing a drain on the website.

A single visit to the website drains more bandwidth than that widget operating on thousands of sites all day long.

It is nothing to worry about.

Ben Rogers
St. Peters, MO
Business Analyst for Website Development

Dave said...

As I said already, the simultaneous connections are the problem, not bandwidth!

As an aside in reference to the bandwidth usage:
RP08 is currently averaging almost one donation every second, so considering that the widget is refreshed every 30 seconds that's ~30 names & locations for each refresh. I would estimate that's 2-5kB of data, assuming that all of the names and locations are transferred.

The problem is simultaneous connections.

Ben Rogers said...

Dave,
There is no such thing as a "simultaneous connection". Websites don't work that way. They can't. Each connection is split up and allowed to pass through (this is called "bandwidth") in a prescribed and timed manner. Every request has a time-stamp, usually down to the millisecond.

They are also assigned priorities and "windows". Most windows are a few seconds long, so they can get their request in, retrieve their information and close down the connection for the next hit.

It is ENTIRELY a bandwidth question because the site has to allocate time to send the data through a single connection. That connection stays open based entirely on how much information has to be sent through the tunnel.

There is no issue whatsoever with the widget. It is not a problem.

You are complaining about a drop of water compared to Niagara Falls.

I've been involved in designing quite a few websites that have to deal with widgets during high-traffic financial transactions. Trust me, the widget is not an issue even if every computer in the US were running it "simultaneously".

Justin said...

I'm more than a 'web site business analyst' and I have to disagree with you, Lee.

I have no idea what the RP server architecture is, but the problem will certainly be due to the number of incoming requests. Physically a box has a limited amount of RAM and each web server process takes up a chunk of that RAM. Without complicating the issue with nuances of caching and web process size, each box can handle an average of 100 or 200 (or whatever) requests because that number of web processes fills up the RAM.

So if you have each box supporting 200 simultaneous requests and the act of serving that image/data averages 1 second (for connect/serve/disconnect), you can support 200 simultaneous users per second per box. [sure the image may be 50K, but latency and process overhead are the real issue]

So... If there are 80,000 people using your banner and they each poll every 30 seconds, that's 666 requests per second. If each box can support 200 connections/second, you are using up 3 boxes of their web farm just with your widget.

Assuming the data is only 10K, you are eating up 6.66M/second of bandwidth as well.

This is death by a thousand cuts, not a 'drop of water'.

If you are a RP supporter you should seriously consider changing the way this information is served.

Ben Rogers said...

And if we had 80,000 sites hitting RP08 for this info, it might matter.

We know of 1. The one that this blog serves. We're all hitting this site, which is regurgitating the information in the widget from the RP08 site.

None of us who are viewing "http://paulcash.slact.net/" are touching RP08 or affecting ANY of its bandwidth.

Any of us who are hitting the www.ronpaul2008.com website itself are the problem. Those of us watching Paulcash.slact are not having ANY effect on the RP08 site.

We aren't even a drop in the bucket--we're not even an atom.

Unknown said...

With regards to what Renewedspirit said the banner is simply fetching data from the RP08 site. It doesn't touch slact. Watch the packets and see where they are going/coming from.

In addition, the problem isn't the number. The number, as you said, is a blip - 32 bits. + packet info = roughly 1/2kb of data.

The real problem is that every update a list of donors are listed. Thats every donor and their address that has donated since the last update + a few- even if they aren't displayed(when the donations are coming fast, the # of people shown is far less than the list your computer gets- thats how sites track the # of donors accurately)

That brings the packets up to over a few kb, every 30 seconds for every person who has the widget open on any tab.

Doesn't matter anymore though, the tea party is almost over.

Thane said...

The flash widget jumped 400,000 in one update sometime between 10:20 and 10:40 PM. Your totals contiue to update without this 400,000. Why the difference?

Ryan said...

I was wondering the same thing, how come the graphs haven't been bumped with the ~385,000 jump that happened?

S.Tabani said...

please turn it off, the site can take all the help it can get in the last stagse.

Unknown said...

I was going to ask about the missing 400K too. According to my math, we started the day a little over $11.5 mill, currently we are at $17.59 mill, which is around $6 mill total, but your counts show around $5.6. Is the 400K considered an out lier and now counted?

Unknown said...

Please update Paulcash. We're well over $6,000,000 for the day. We started at 11,550,000.

Phalanx said...

whats going on with your totals
$17.89m
-$5.86m
= 12.03m

Now I know we started out under 12million at today at 12am like 11.5million. Your total should be more like 6.3million

Aristotle said...

17.91M at midnight...

So in a way, the Bill of Rights was also memorialized today!

(Dec 15, 1791: Bill of Rights ratified.)

Anonymous said...

nice catch aristotle

Unknown said...

Excellent work today Leo, and to the rest of America! We all helped in making a big statement to the establishment, and propelling a TRUE presidential candidate one-step closer to the prize we all deserve.

Go Ron Paul!

Calif Majere said...

I think the site made a mistake!

It's showing lower fund raising numbers than it was before.

total raised today: $40,528
total raised Q4: $17,956,073
This is what its showing now. At 12:30ish EST.

But if you look here..
http://flickr.com/photo_zoom.gne?id=2116510105&size=o
It shows him at midnight aronud 17,980,000 so the 40k should have sent him over the 18 million mark.

Can someone post and explain the discrepancy?

Daniel K said...

I think the flash widget is counting offline donations while the paulcash graph is only tracking online donations. Thus the discrepancies.

Red Devil said...

Stick it on a secondary server apart from the main one and just have the feed sent to that server from the main server once very thirty seconds and the secondary server won't impact the main one. :-)