I was staring at my bandwidth usage tonight and it is quite high…. and thanks to this cool SVG based stats system that easerve provides, I can drill down and figure out which pages are causing the bulk of that traffic… well, the biggest offenders for # of hits were the aggBugs that .Text includes (because my blog posts, including the aggbugs, are shown on MSDN, and therefore generate 3 aggBug requests for every single view of the Visual Basic or C# Developer Center pages), but the biggest use of bandwidth was by far the mainfeed.aspx…. the main RSS feed for the site…
I checked out that feed, and it included 35 items… a value that I couldn’t seem to change through any of the config options… I tracked it down to a stored proc (DNW_GetRecentPosts if you are interested) that had a ‘Top 35’ option specified… so I knocked that way down (possibly too far, we’ll see) to 5… which should greatly reduce the bandwidth used by that page
Next up was those pesky aggBugs… I turned them off for a few days, but I wanted a longer term solution, one where I wouldn’t get aggBug hits when the feed was displayed on MSDN, but I would for ’normal’ aggregator use…. so I modified the main and category based RSS handlers to skip adding the aggBugs if the RSS request had an additional param of “aggBug=False” …. normal users won’t have that, but I can control the URL being pulled onto MSDN so I’ll make sure it includes this little param… We’ll see how that work out over the next week or so…
Its funny, I’ve worked on quite a few web systems, but they were all very ’transaction’ focused and most of our performance optimization was focused around avoiding trips to the database and execution of code. Basically we ended up creating a variety of caching systems (ASP.NET’s caching options would have been wonderful to have back then), but it was rare for me to spend much time on the bandwidth side of the equation, especially since many of these systems were Intranet applications (still potentially 1000s of users inside a company, but speed of page execution was all that mattered, size of payload or bandwidth didn’t matter much on a LAN). Looking at bandwidth usage is an interesting change….
Thoughts on this post? Feel free to reach out on Twitter!
e06898f @ 2019-03-31