SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Lessons Learnt.
  An In Production,
Scaleable Django Stack
 PyCon ireland - Dublin, Oct 13th-14th 2012
         john.moylan@rte.ie / john@8t8.eu / @redsnapper88
Brief Intro to RTE.ie
Website of Ireland's national broadcaster
Problem
Mostly W.O.R.M, but some stuff can't be cached :(
Lot's of content
(100's GB's of HTML)
10's TB of Audio and Video

Lots of strands (News, Sport, Business, Ent., TV, Radio,
Teletext, Archives, Young Peoples, Performing Groups...)

Small team.
Try to keep things as simple and efficient as possible.
                                  ...massive growth
Traffic Growth
Oct 2010 V's Oct 2011
Traffic nearly doubled.
Flashmob Traffic
36Gb/s of Traffic. 41K Concurrent streams.
Playlists were not cacheable........




But what a great fight.
Static?
Legacy system published to static files using
XML/XSL Publisher.

Multiple versions per type of view.

SSI's inside SSI's inside SSI's

Republishing a strand could take days.
Dynamic Requirement
Evaluated some systems:

Wicket, Rails, Shale....Django

Hmmm... nice

All in package, sensible defaults. Similar
problem domain.
Try Before you buy
2008
Wrote prototype video upload sharing site...
(Django 0.96) and then decided to make it live.

http://web.archive.org/web/20090318064215/http://www.rte.ie/tv/theden/ugc/red/video/
Try Before You Buy
2009
Original RTÉ Player - Written in Django.

2011
Let's use Django to make the whole site
dynamic!
..continued
2012
Sport, About, RTÉ Player v.2, Radio, News?,
Archives, playlists, lifestyle, SSO......and on
and on

2013..
More
Django Delivery

Linux
Apache with Event MPM and mod_wsgi
Mysql and MHA (tip Innodb plugin)
Solr for search and 'NoSQL'
Varnish (used to use Squid)
LVS-NAT and LVS-DR Load-balancers.
Memcache
Deploying Glusterfs
Code Management
Git
Redmine
Gitosis
Deployment
Cobbler
Fabric
Buildout
Monitoring
Monitor & Measure everything!
Zenoss
RRDTool
MRTG
Graphite
Statsd - mozilla's Django-statsd
Sentry
Lot's of custom monitoring
In House Monitoring projects
Pyvarnish
https://github.com/redsnapper8t8/pyvarnish
In House Monitoring Projects
Digital Dash - (open sourced soon)
Benchmarking
Tool agnostic but seem to use these alot.

Bonnie++
Netperf

#HTTP
Httperf
Siege
Performance Tips
1.   Memory, memory, memory
2.   Caching - in memory
3.   Does it scale horizontally?
4.   KISS
Lessons Learnt.
Read from memory whenever possible
Cache, learned this one a long time ago but
whenever we have issues it can usually be tracked
down bad design and lack of caching. Don't hit
your web servers unless you have to.

Memcache, Varnish
Long live Rest - GET's should not have side
effects. Varnish

KISS - and no resume driven development.
Thank you
Questions?

Also, did I mention that we are hiring?

Weitere ähnliche Inhalte

Ähnlich wie Pycon2012

ELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
ELCE 2010 - State Of Multimedia In 2010 Embedded Linux DevicesELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
ELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
Benjamin Zores
 
Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014
Pebble Technology
 

Ähnlich wie Pycon2012 (20)

IPTC News Exchange Formats Working Party Autumn 2012
IPTC News Exchange Formats Working Party Autumn 2012IPTC News Exchange Formats Working Party Autumn 2012
IPTC News Exchange Formats Working Party Autumn 2012
 
The 12 tasks of Asterisk
The 12 tasks of AsteriskThe 12 tasks of Asterisk
The 12 tasks of Asterisk
 
The dangers of black box devices.
The dangers of black box devices.The dangers of black box devices.
The dangers of black box devices.
 
Milkymist System-on-Chip at Open Source Hardware User Group 8
Milkymist System-on-Chip at Open Source Hardware User Group 8Milkymist System-on-Chip at Open Source Hardware User Group 8
Milkymist System-on-Chip at Open Source Hardware User Group 8
 
C language in our world 2017
C language in our world 2017C language in our world 2017
C language in our world 2017
 
Dan York - Presentation at Emerging Communications Conference & Awards (eComm...
Dan York - Presentation at Emerging Communications Conference & Awards (eComm...Dan York - Presentation at Emerging Communications Conference & Awards (eComm...
Dan York - Presentation at Emerging Communications Conference & Awards (eComm...
 
Plone - A History of Python Web
Plone - A History of Python WebPlone - A History of Python Web
Plone - A History of Python Web
 
tizen-rt-javascript-20181011
tizen-rt-javascript-20181011tizen-rt-javascript-20181011
tizen-rt-javascript-20181011
 
ELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
ELCE 2010 - State Of Multimedia In 2010 Embedded Linux DevicesELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
ELCE 2010 - State Of Multimedia In 2010 Embedded Linux Devices
 
soft-shake.ch - Optimizing iOS applications
soft-shake.ch - Optimizing iOS applicationssoft-shake.ch - Optimizing iOS applications
soft-shake.ch - Optimizing iOS applications
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
 
Is Ldap Dead ?
Is Ldap Dead ?Is Ldap Dead ?
Is Ldap Dead ?
 
IoTaConf 2014 - IoT Connectivity, Standards, and Architecture
IoTaConf 2014 - IoT Connectivity, Standards, and ArchitectureIoTaConf 2014 - IoT Connectivity, Standards, and Architecture
IoTaConf 2014 - IoT Connectivity, Standards, and Architecture
 
Sheepdog Status Report
Sheepdog Status ReportSheepdog Status Report
Sheepdog Status Report
 
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, ParisThe complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
The complex IoT equation, and FLOSS solutions, OW2con'18, June 7-8, 2018, Paris
 
webthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzrwebthing-floss-iot-20180607rzr
webthing-floss-iot-20180607rzr
 
The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
 
Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 

Pycon2012

  • 1. Lessons Learnt. An In Production, Scaleable Django Stack PyCon ireland - Dublin, Oct 13th-14th 2012 john.moylan@rte.ie / john@8t8.eu / @redsnapper88
  • 2. Brief Intro to RTE.ie Website of Ireland's national broadcaster
  • 3. Problem Mostly W.O.R.M, but some stuff can't be cached :( Lot's of content (100's GB's of HTML) 10's TB of Audio and Video Lots of strands (News, Sport, Business, Ent., TV, Radio, Teletext, Archives, Young Peoples, Performing Groups...) Small team. Try to keep things as simple and efficient as possible. ...massive growth
  • 4. Traffic Growth Oct 2010 V's Oct 2011 Traffic nearly doubled.
  • 5. Flashmob Traffic 36Gb/s of Traffic. 41K Concurrent streams. Playlists were not cacheable........ But what a great fight.
  • 6. Static? Legacy system published to static files using XML/XSL Publisher. Multiple versions per type of view. SSI's inside SSI's inside SSI's Republishing a strand could take days.
  • 7. Dynamic Requirement Evaluated some systems: Wicket, Rails, Shale....Django Hmmm... nice All in package, sensible defaults. Similar problem domain.
  • 8. Try Before you buy 2008 Wrote prototype video upload sharing site... (Django 0.96) and then decided to make it live. http://web.archive.org/web/20090318064215/http://www.rte.ie/tv/theden/ugc/red/video/
  • 9. Try Before You Buy 2009 Original RTÉ Player - Written in Django. 2011 Let's use Django to make the whole site dynamic!
  • 10. ..continued 2012 Sport, About, RTÉ Player v.2, Radio, News?, Archives, playlists, lifestyle, SSO......and on and on 2013.. More
  • 11. Django Delivery Linux Apache with Event MPM and mod_wsgi Mysql and MHA (tip Innodb plugin) Solr for search and 'NoSQL' Varnish (used to use Squid) LVS-NAT and LVS-DR Load-balancers. Memcache Deploying Glusterfs
  • 14. Monitoring Monitor & Measure everything! Zenoss RRDTool MRTG Graphite Statsd - mozilla's Django-statsd Sentry Lot's of custom monitoring
  • 15. In House Monitoring projects Pyvarnish https://github.com/redsnapper8t8/pyvarnish
  • 16. In House Monitoring Projects Digital Dash - (open sourced soon)
  • 17. Benchmarking Tool agnostic but seem to use these alot. Bonnie++ Netperf #HTTP Httperf Siege
  • 18. Performance Tips 1. Memory, memory, memory 2. Caching - in memory 3. Does it scale horizontally? 4. KISS
  • 19. Lessons Learnt. Read from memory whenever possible Cache, learned this one a long time ago but whenever we have issues it can usually be tracked down bad design and lack of caching. Don't hit your web servers unless you have to. Memcache, Varnish Long live Rest - GET's should not have side effects. Varnish KISS - and no resume driven development.
  • 20. Thank you Questions? Also, did I mention that we are hiring?