“Startup	
  DevOps”	
  
Tuesday,	
  12th	
  August	
  2014	
  
Jon	
  Milsom	
  
Co-­‐founder	
  &	
  CTO	
  
	
  
Hiring	
  
•  Roles	
  
– FullHme	
  Junior	
  Dev	
  (Frontend	
  &	
  some	
  PHP)	
  
– Freelance	
  SysAdmins	
  /	
  Ops	
  for	
  ad-­‐hoc	
  projects	
  
•  Opportunity	
  
– Make	
  a	
  big	
  impact	
  in	
  a	
  small	
  team	
  
WHAT	
  IS	
  PITCHERO?	
  
Websites	
  for	
  amateur	
  sports	
  
teams	
  
Online	
  management	
  plaRorm	
  for	
  
amateur	
  sports	
  teams/clubs/
leagues/counHes/governing	
  
bodies	
  
Market?	
  
Not	
  this…	
  
Source:	
  hWp://images.football365.com/13/03/800x600/David-­‐Beckham-­‐St-­‐EHenne-­‐v-­‐PSG-­‐2013_2917145.jpg	
  
This…	
  
Source:	
  hWp://sanford-­‐soccer-­‐net.blogspot.co.uk/2011/03/massive-­‐aWack-­‐loving-­‐tribute-­‐to-­‐fat.html	
  
Traffic	
  
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
iPhone	
  
Jan	
  2013	
  
User	
  generated	
  content	
  
Tech	
  Team	
  
THE	
  “HYBRID”	
  CLOUD	
  
Hybrid	
  Cloud?	
  
Image	
  from:	
  hWp://www.rackspace.com/cloud/hybrid/	
  
Why	
  Hybrid?	
  
•  Reliable	
  (keep	
  some	
  dedicated	
  boxes)	
  
•  Easy	
  to	
  scale	
  
Moving	
  from	
  dedicated	
  boxes…	
  
•  Moved	
  session	
  management	
  into	
  Redis	
  
•  Don’t	
  rely	
  on	
  file	
  system	
  
•  Don’t	
  rely	
  on	
  any	
  single	
  node	
  
•  Rely	
  on	
  config	
  files	
  
•  Yada	
  yada…	
  Loads	
  of	
  other	
  stuff	
  that	
  I	
  can’t	
  
recall	
  
Cool!	
  
Source:	
  hWp://www.ktvu.com/news/entertainment/funk-­‐legend-­‐headlines-­‐sf/nD63D/	
  
Not	
  cool	
  L	
  
Source:	
  hWp://www.mixcrate.com/oneworld/phenoms-­‐of-­‐funk-­‐george-­‐clintonparliamenRunkadelicbootsy-­‐collins-­‐162038	
  
In	
  pracHce	
  
Previously	
  internal	
  traffic	
  now	
  goes	
  through	
  firewall	
  &	
  back	
  out	
  
Issues	
  -­‐	
  Latency	
  
Issues	
  -­‐	
  Latency	
  
Approx	
  40ms	
  memcache.	
  ~	
  20%	
  of	
  total!	
  
Issues	
  -­‐	
  Throughput	
  
Issues	
  -­‐	
  Throughput	
  
•  Exceeded	
  internal	
  throughput	
  
– Increased	
  latency	
  
– Dropped	
  packets	
  
•  Had	
  to	
  upgrade	
  firewall	
  
– UnanHcipated	
  cost	
  
MESSAGE	
  QUEUES	
  
NewsleWer	
  System	
  
•  1M	
  emails	
  /	
  month	
  
•  Up	
  to	
  200k/day	
  
•  Generated	
  
dynamically	
  
NewsleWer	
  System	
  
•  Via	
  Cron	
  
– Synchronous	
  process	
  
– Sent	
  via	
  5	
  minute	
  cron	
  
– 500	
  in	
  a	
  batch	
  
Problem?	
  
144,000	
  emails	
  per	
  day	
  
200,000	
  subscripHons	
  
200,000	
  >	
  144,000	
  
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
SoluHon…	
  
High-­‐Scale	
  Async	
  Processing	
  
The	
  Message	
  Queue	
  For	
  the	
  Cloud	
  
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
NewsleWer	
  System	
  
•  Via	
  MQ	
  
– Processed	
  Async	
  
– Sent	
  quickly	
  
•  200k+	
  within	
  1	
  hour	
  
– X	
  concurrent	
  workers	
  
NewsleWer	
  System	
  
•  Sessions	
  
•  Average	
  peak	
  before:	
  5,000	
  
•  Average	
  peak	
  aver:	
  10,000	
  
“Business”	
  results…	
  
CACHING	
  
Simple	
  Model	
  
OpHmal	
  Caching	
  
•  Every	
  client	
  wants	
  the	
  same	
  content	
  
•  The	
  content	
  doesn’t	
  change	
  oven	
  
OpHmal	
  Caching	
  
•  Every	
  client	
  wants	
  the	
  same	
  content	
  
•  The	
  content	
  doesn’t	
  change	
  oven	
  
Pitchero	
  
Model	
  
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
OpHon	
  #1	
  –	
  Increase	
  DB	
  layer	
  
•  Pros	
  
– Simplify	
  development	
  
	
  
•  Cons	
  
– OperaHons	
  headache	
  
– Expensive	
  
– Performance	
  hit	
  
OpHon	
  #2	
  –	
  Intelligent	
  caching	
  
•  Pros	
  
– Cheap	
  (spare	
  RAM?)	
  
– Fast	
  
– Low	
  operaHons	
  overhead	
  
•  Cons	
  
– Dev	
  work	
  
– Not	
  relaHonal	
  
– Can’t	
  rely	
  on	
  a	
  key	
  exisHng	
  
“There	
  are	
  only	
  two	
  hard	
  things	
  in	
  
Computer	
  Science:	
  cache	
  
invalida:on	
  and	
  naming	
  things.“	
  
	
  
-­‐	
  Phil	
  Karlton	
  
“There	
  are	
  only	
  two	
  hard	
  things	
  in	
  
Computer	
  Science:	
  cache	
  
invalida:on	
  and	
  naming	
  things.“	
  
	
  
-­‐	
  Phil	
  Karlton	
  
ProperHes	
  of	
  our	
  plaRorm	
  
•  Natural	
  Groups	
  
– PlaRorms	
  
•  Club	
  
•  League	
  
•  County	
  
ProperHes	
  of	
  our	
  plaRorm	
  
•  Natural	
  Groups	
  
– PlaRorms	
  
•  Club	
  
–  Discreet	
  club_ids:	
  x,y,z	
  
•  League	
  
–  Discreet	
  league_ids:	
  i,j,k	
  
•  County	
  
–  Discreet	
  county_ids:	
  p,q,r	
  
SoluHon	
  #1	
  
“The	
  InvalidaHon	
  Manager”	
  
•  ApplicaHon	
  
– “I	
  have	
  changed	
  A”	
  
•  InvalidaHon	
  Manager	
  
– “I	
  will	
  invalidate	
  A1,	
  A2,	
  A3”	
  
Feeling	
  preWy	
  smug…	
  
What	
  really	
  happened…	
  
•  ApplicaHon	
  
–  “I	
  have	
  changed	
  A”	
  
•  InvalidaHon	
  Manager	
  
–  “I	
  will	
  invalidate	
  A1,	
  A2,	
  A3,	
  B2,	
  C7,	
  D4,	
  F8,	
  G8,	
  A3	
  
(twice!),	
  B6,	
  H28,	
  M14,	
  J139”	
  
“The	
  InvalidaHon	
  Manager”	
  
Un-­‐managable!	
  
Problems	
  
•  Cross	
  domain	
  dependencies	
  A,	
  B,	
  C	
  etc	
  
•  Reliance	
  on	
  developers	
  
•  Large	
  number	
  of	
  invalidaHon	
  events	
  
•  Users	
  content	
  disappeared	
  
•  Users	
  could	
  not	
  delete	
  content	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  Example	
  cache	
  keys	
  
– “club1234_news56789”	
  
– “club1234_report4321”	
  
– “club1234_video1357”	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  Example	
  cache	
  keys	
  
– “club1234_news56789”	
  
– “club1234_report4321”	
  
– “club1234_video1357”	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  Example	
  cache	
  keys	
  
– “{club}_news56789”	
  
– “{club}_report4321”	
  
– “{club}_video1357”	
  
•  {club}	
  is	
  a	
  variable,	
  stored	
  in	
  memcache	
  
•  {club}	
  =	
  hash_fn(club,	
  club_id,	
  Hme())	
  
Just	
  added	
  support	
  for	
  dynamically	
  
namespacing	
  memcache	
  keys…	
  
Source:	
  hWp://www.troll.me/meme/fist-­‐baby	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  EffecHvely	
  namespaced	
  cache	
  keys	
  
•  Can	
  now	
  invalidate*	
  an	
  enHre	
  plaRorms	
  (e.g.	
  
club_id:1234)	
  data	
  in	
  one	
  command	
  
•  No	
  required	
  knowledge	
  of	
  the	
  rest	
  of	
  the	
  key	
  
•  Don’t	
  need	
  to	
  add	
  keys	
  to	
  invalidaHon	
  
manager	
  each	
  Hme	
  we	
  add	
  new	
  funcHonality	
  
*No	
  actual	
  invalidaHon	
  happens:	
  we	
  just	
  change	
  the	
  names	
  of	
  the	
  keys	
  to	
  something	
  
that	
  doesn’t	
  exist.	
  Memcache	
  will	
  garbage	
  collect	
  based	
  on	
  LRU.	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  Results	
  
– Reduced	
  load	
  on	
  database	
  
– Low	
  ops	
  overhead	
  
– LiWle	
  input	
  required	
  from	
  developers	
  
SoluHon	
  #2	
  –	
  “PlaRorm	
  Cache”	
  
•  Not	
  perfect	
  
– Requires	
  an	
  extra	
  memcache	
  lookup	
  for	
  the	
  
namespace	
  key	
  
ON-­‐DEMAND	
  IMAGE	
  PROCESSING	
  
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014
Any	
  image	
  
Any	
  size	
  
As	
  the	
  page	
  loads	
  
Problems	
  
•  10M	
  images	
  
•  Currently	
  in	
  3	
  sizes	
  (30M	
  objects)	
  
•  Up	
  to	
  50	
  images	
  on	
  some	
  pages	
  
– High	
  traffic	
  =>	
  very	
  high	
  request	
  rate	
  
	
  
Old	
  Model	
  
3	
  set	
  sizes	
  
	
  
/{user_id}/{image_id}.jpg	
  -­‐	
  600x450	
  
	
  
/{user_id}/sm_{image_id}.jpg	
  -­‐	
  120x90	
  
	
  
/{user_id}/Hny_{image_id}.jpg	
  -­‐	
  50x37	
  
New	
  Model	
  
Any	
  image,	
  any	
  size	
  
	
  
/?url={s3_image_url}&w={width}&h={height}&q={quality}	
  
	
  
Hash	
  parameters	
  and	
  store	
  on	
  disk	
  once	
  generated	
  
	
  
	
  
	
  
Checkout:	
  hWp://images.weserv.nl/	
  
New	
  Model	
  
Super	
  fast…	
  
	
  
Average	
  server	
  response	
  15ms	
  (CloudFront	
  faster?)	
  
	
  
>>	
  CloudFront	
  
	
   	
  >>	
  Server	
  (from	
  disk)	
  
	
   	
   	
   	
  >>	
  Server	
  (generate	
  from	
  S3	
  original)	
  
WHAT	
  ABOUT	
  “DEVOPS”?	
  
DevOps	
  Status	
  
•  Dev	
  working	
  pracHces	
  
– Version	
  control	
  
– One	
  command	
  deployment	
  
– (Some)	
  automated	
  tesHng	
  
•  Ops	
  working	
  pracHces	
  in	
  infancy	
  
– Setup	
  lists	
  &	
  bash	
  scripts	
  
– Not	
  taking	
  advantage	
  of	
  the	
  cloud	
  
The	
  Future	
  
•  Infrastructure	
  as	
  code	
  
•  More	
  automated	
  tesHng	
  
•  BeWer	
  automated	
  tesHng	
  
•  Cloud?	
  Dedicated?	
  
QuesHons?	
  
@jonmilsom	
  
jon@pitchero.com	
  
hWp://uk.linkedin.com/in/jonmilsom	
  

More Related Content

PDF
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
PPTX
Optimizing performance
PDF
Content distribution
PPTX
Profiling and Tuning a Web Application - The Dirty Details
PPTX
Stress Test Drupal on Amazon EC2 vs. RackSpace cloud
PPT
Make Drupal Run Fast - increase page load speed
PPTX
Top 10 Application Problems
PPTX
Improving Drupal Performances
Pitchero - Increasing agility through DevOps - Leeds DevOps November 2016
Optimizing performance
Content distribution
Profiling and Tuning a Web Application - The Dirty Details
Stress Test Drupal on Amazon EC2 vs. RackSpace cloud
Make Drupal Run Fast - increase page load speed
Top 10 Application Problems
Improving Drupal Performances

What's hot (20)

PDF
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
PDF
DrupalCamp LA 2014 - A Perfect Launch, Every Time
PPTX
Wordcamp2009
PPT
Windy cityrails performance_tuning
ZIP
High Performance WordPress - WordCamp Jerusalem 2010
PPT
Web Application Optimization Techniques
PPT
High Availability Perl DBI + MySQL
PDF
High Performance WordPress II
PDF
Scalability vs. Performance
PPTX
20120329 installing wordpress_3_3_1_locally
PPTX
Scaling wix with microservices and multi cloud - 2015
PPTX
Build, Launch, Fail, Learn, Refactor, Repeat
PDF
Ask the XPages Experts
KEY
Make Life Suck Less (Building Scalable Systems)
PDF
Optimus XPages: An Explosion of Techniques and Best Practices
PDF
Leeward WordPress Meetup- Caching and Website Speed
PDF
Updating WordPress Themes, Plugins, and Core Safely
PPTX
Breaking the Speed Limit: Faster Websites Win
PDF
A simple workflow system using state machines
PPTX
How to scale up, out or down in Windows Azure - Webinar
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
DrupalCamp LA 2014 - A Perfect Launch, Every Time
Wordcamp2009
Windy cityrails performance_tuning
High Performance WordPress - WordCamp Jerusalem 2010
Web Application Optimization Techniques
High Availability Perl DBI + MySQL
High Performance WordPress II
Scalability vs. Performance
20120329 installing wordpress_3_3_1_locally
Scaling wix with microservices and multi cloud - 2015
Build, Launch, Fail, Learn, Refactor, Repeat
Ask the XPages Experts
Make Life Suck Less (Building Scalable Systems)
Optimus XPages: An Explosion of Techniques and Best Practices
Leeward WordPress Meetup- Caching and Website Speed
Updating WordPress Themes, Plugins, and Core Safely
Breaking the Speed Limit: Faster Websites Win
A simple workflow system using state machines
How to scale up, out or down in Windows Azure - Webinar
Ad

Similar to Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014 (20)

PDF
Profiling for Grown-Ups
PDF
Fixing twitter
PDF
Fixing_Twitter
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PDF
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
PPT
Web Speed And Scalability
PDF
Facebook, Robert Johnson
PPTX
Procrastination as a Service: Caching and Queueing
KEY
Fixing Twitter Velocity2009
PDF
PyGrunn2013 High Performance Web Applications with TurboGears
PDF
App engine devfest_mexico_10
PDF
Improving The Performance of Your Web App
PPTX
Caching Up and Down the Stack
PPTX
Caching
PPTX
Best Practices for WordPress in Enterprise
PDF
HTTP cache @ PUG Rome 03-29-2011
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
PDF
Tulsa tech fest 2010 - web speed and scalability
PDF
Best practices-wordpress-enterprise
PDF
Where Django Caching Bust at the Seams
Profiling for Grown-Ups
Fixing twitter
Fixing_Twitter
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Web Speed And Scalability
Facebook, Robert Johnson
Procrastination as a Service: Caching and Queueing
Fixing Twitter Velocity2009
PyGrunn2013 High Performance Web Applications with TurboGears
App engine devfest_mexico_10
Improving The Performance of Your Web App
Caching Up and Down the Stack
Caching
Best Practices for WordPress in Enterprise
HTTP cache @ PUG Rome 03-29-2011
UnConference for Georgia Southern Computer Science March 31, 2015
Tulsa tech fest 2010 - web speed and scalability
Best practices-wordpress-enterprise
Where Django Caching Bust at the Seams
Ad

Recently uploaded (20)

PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Five Habits of High-Impact Board Members
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
DOCX
search engine optimization ppt fir known well about this
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPT
Geologic Time for studying geology for geologist
PDF
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
PDF
Architecture types and enterprise applications.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Modernising the Digital Integration Hub
Final SEM Unit 1 for mit wpu at pune .pptx
Module 1.ppt Iot fundamentals and Architecture
Five Habits of High-Impact Board Members
NewMind AI Weekly Chronicles – August ’25 Week III
search engine optimization ppt fir known well about this
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Geologic Time for studying geology for geologist
Two-dimensional Klein-Gordon and Sine-Gordon numerical solutions based on dee...
Architecture types and enterprise applications.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Custom Battery Pack Design Considerations for Performance and Safety
A review of recent deep learning applications in wood surface defect identifi...
Modernising the Digital Integration Hub

Startup DevOps - Jon Milsom Pitchero - Leeds DevOps - August 2014