Archive for June, 2008

Twitter Green

June 30th, 2008

Twitter Logo

I’ve just taken up using Twitter.  So far so good.  Two points though, one of which isn’t the fault of Twitter but:

1. DowningStreet doesn’t bloody shut up!!

2. The site has complained about being snowed under 3 times so far.  They could sort this easily by using Django instead of Rails. ;)

Other than that it seems alright.  For Rubyists you may be interested in the Twitter Rubygem by John Nunemaker: Twitter.


gem install twitter

P.S. Green as in: new, rookie, etc

Realistic Load Tests

June 21st, 2008

I’ve always been a bit uncomfortable with the claims of 250 req/sec for this and 500 req/sec for that. It’s never felt quite….right.  Or real.  After all how many sites truly get that many concurrent requests?  How many visitors a day would you need to get spikes of 500 req/sec hitting your server?

Well it seems the metric is flawed and so sayeth one of the developers of the Google App Engine during one of the IO talks done in May.

In that talk he mentions that people have been trying to run load tests on the GAE that simply throw hundreds of concurrent requests and conclude the test after one second.  Unfortunately this isn’t realisitic and so the optimisations that are built into the system don’t have time to kick in.

I’d say this isn’t just an issue for GAE – its an issue with this benchmarking method full-stop.  Because as he says – its unrealistic.

Take the following example numbers from the slides:

Realistic values
• 50,000 users / day
• 2 pageviews / user
• 100,000 pageviews / day
• 5 requests / pageview
• 500,000 requests / day
• 5.8 requests / second

To some people 50k users may not seem much but irrespective I’d say its certainly a sizable chunk for the majority of readers here.  As you can see if a site is being hit by 50,000 users per day they can expect a realistic hit rate of 5.8 concurrent requests per second.

Let me say that again: A site that gets 50,000 user per day can expect just 5.8 average concurrent requests per second.

Thats a realistic number and it blows out of the water the benchmarking methods that hammer a server for one second with hundreds of requests.  People using those benchmarks have two flaws:

  1. If they get a low number they may be unfairly assuming a poor service based on a spurious and unrealistic testing methodology.
  2. If they get a high number they’ll assume that their server can take sustained heavy load which is certainly not the case.

What the speaker then recommends is performing more realistic load tests spread over time.  This not only provides a more realistic basis for conclusions but also enables servers to adapt to the increasing load.

You can see the video which is about making production ready apps on Google App Engine by visiting its IO page here.

UPDATE

Digg Effect / Slashdotting

One of the obvious counters to this criticism which is also expressed at the end of this talk is that the Digg Effect or Slashdotting is indeed something that requires high ‘per second’ load testing.  However, thats not the case as these phenomena actually occur over a period of minutes and even hours and not a vertical spike.  The number of concurrent hits is still relatively low and so these hundreds per/sec tests don’t fit here either.

Django Found’s….

June 17th, 2008

A Django site.A Foundation!!

Putting aside my grammatically dodgy statement the Django Project (the b3zt framework evaz!) has created the Django Foundation.  A non-profit organisation in the same vein as Mozilla, Apache, etc it aims to oversee the development, direction and future of the Django project.

You can find out more about the groups goals at the Foundation page on Django Project.

Lots of warm fuzzy snuggles to the community too:

We certainly couldn’t have gotten here without the amazing support and contributions from our community of users and developers. To everyone who’s used or contributed to Django: thanks!


Through testking you can be sure that the 350-001 you wrote was worth something, and you gained something by skipping 640-802. This also leads one to a faster VCP-310.

Rails 2.1 eBook

June 17th, 2008

Ruby

I’m getting bored of Rails now but if you’re interested in an eBook detailing the changes in the latest 2.1 release then you can’t go far wrong with this one:

Free Rails Ebook


Many professionals who are done with their 70-290 and 70-291 prefer writing help e-books for students who are in the middle of their 70-649 or 70-270. These are the ones who write exams like 646-204.

Latest Django Site

June 16th, 2008

New Django Site - Image Freelance HairI recently completed a Django-based site for a friend which you can view here.  It’s a simple affair but with some interesting features (its very pink!):

Shop – Plugs into Amazon feed to get products and revenue generation from Associates tag (not quite finished as it needs to be styled better).

Gallery – The front end of this is all MooTools based SmoothGallery2.0 with a nifty backend providing uploading, tagging, etc.  I think the SmoothGallery is great but I can see it struggling with anymore pics in it.

Contact – Simple email on sending.  Also embedded MSN Live maps – it looks so much nicer than Google’s and its easier to use.

XML Sitemap – Using Djangos built-in Sitemap generator.

Blog – Basic blog with the FreeComments plugin.

Some of the pages can be edited much like a CMS.  This is standard in Django when you use something called Flat Pages.

As a first proper released project of Django I’m chuffed.  Its come out nicely and its immensely fast compared to my Rails sites. ;)

I plan on doing a few more in Django before moving onto MERB in the not to distant future.