iPlayer Day: Performance tricks behind the scenes
Remember this?
This was the look of the ´óÏó´«Ã½ iPlayer homepage that we went live with in July of 2007. In those days we were delivering a few hundred TV programmes that could only be viewed by download to Windows PC. Looking back at them now these pages look pretty dull and empty and it was a challenge to get them to change a few times a day.
Now we deliver thousands of TV and Radio programmes. Seems like every day when I get in to work someone has dreamt up a new device to serve iPlayer content to or a new ´óÏó´«Ã½ service that wants to contribute programmes into iPlayer. I would never have guessed that the ´óÏó´«Ã½ had so many different TV and Radio stations nor that it made such a huge set of programmes.
Today's iPlayer site is built by the iPlayer Publishing Services team. The server side components for today's iPlayer site are built by the iPlayer Publishing Services team.
We are a group of OO perl/Catalyst/mysql developers who are working hard to make the iPlayer pages as rich and engaging as possible while serving 9 million page views a day each in under 2 seconds.
How do we do it?
We use every performance trick we can think of. Our database is flattened, denormalised and heavily indexed to make sql queries as quick as possible. For each query we get we build an abstraction we call our blocklist. These are the lists of programmes on the pages. We serialise these perl objects into memcached ready to reuse for a fixed period of time. We spider our object building to always ensure we have a memcached ready.
iPlayer site traffic gets up to nearly one thousand concurrent requests per second. We share head-end serving with the rest of bbc.co.uk traffic which is handled by 18 Apache web-servers running Apache 2.2 and mod_cache. Behind these sit two Zeus ZXTM load balancing/http cache servers which distribute traffic our eight application servers. Our application server config is Apache2.2/OOperl/Catalyst/memcached. Behind these are 2 mySql DB servers one master and one slave.
In addition to the iPlayer site pages we also serve Atom feeds for all the iPlayer traffic. There are feeds for every programme taste and type of user from C´óÏó´«Ã½ educational TV programmes to Radio Foyle daily schedules.
Things we are working on for next year are ways of making iPlayer more personal, we'll also be refining the way we publish programmes through our player to come up with seamless ways of moving from one programme to the next.
Marina Kalkanis is Senior Technical Architect, ´óÏó´«Ã½ Future Media & Technology
Comment number 1.
At 12th Dec 2008, JeryBox wrote:bbc.co.uk
Complain about this comment (Comment number 1)
Comment number 2.
At 14th Dec 2008, Nightwol wrote:Fascinating post! Would love to know more about the optimizations you've needed to employ to keep the service response as good as it is.
Complain about this comment (Comment number 2)
Comment number 3.
At 9th Sep 2009, felicioo wrote:This comment was removed because the moderators found it broke the house rules. Explain.
Complain about this comment (Comment number 3)
Comment number 4.
At 13th Sep 2009, U14134634 wrote:This comment was removed because the moderators found it broke the house rules. Explain.
Complain about this comment (Comment number 4)