How build and deploy shapes software architecture at thetrainline.com

matthewskelton 5,448 views 36 slides Oct 05, 2012
Slide 1
Slide 1 of 36
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36

About This Presentation

By ensuing our software builds and deployments are Reliable, Repeatable, Rapid and Recurring, we can produce software which is lightweight, testable, monitorable, configurable and recoverable. These properties enable features such as load-balancing, scaling, elasticity and rapid recovery, all key fo...


Slide Content

#webperfdays
@matthewpskelton
How build and deployment
shapes software architecture
at thetrainline.com
Matthew Skelton | thetrainline.com
WebPerfDaysEU, London | #webperfdays
05 October 2012

#webperfdays
@matthewpskelton
architecture
= f (build&deploy)
(for some systems)

#webperfdays
@matthewpskelton
Systems engineering
(robotics, control theory, sensors, neuroscience)
Software
development
(finance, insurance, travel, pharma, media, medical imaging)
now
Build & Deployment
at thetrainline.com

#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
9m visits per month to thetrainline.com
2nd most visited UK travel booking website
(behind Easyjet)*
Over 100,000 daily visits via our mobile apps
*source: IMRG hotshopslist Nov 2011

#webperfdays
@matthewpskelton
Booking engines for many UK train operators
Ticketing systems for Corporatesand TMCs
Several hundred individual websites
> £1bn ($1.5bn USD) per year in train ticket sales

#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
•Early “distributed agile” success story
•http://www.thoughtworks.com/trainline

#webperfdays
@matthewpskelton
10+ dev teams in 2 locations

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton
Server Farm
(Build, Deployment, Replication)
100+ build agents
20 dev environments x 20 VMs per
environment = 400 dev VMs
Git replication (Gitolite), …
MORE SERVERS THAN PRODUCTION

#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
architecture
= f (build&deploy)
(for some systems)

#webperfdays
@matthewpskelton
“HERESY!”
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
Web-based
Frequently-
changing
Public-facing
High-volume

#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
RELIABLE
REPEATABLE
RAPID
RECURRING
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
‘R-R-R-R’
BUILD AND DEPLOYMENT
Helps to avoid the Ball of Mud
Enables high-performance
architectures
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
LOAD BALANCING
HIGH AVAILABILITY
SCALING
ELASTIC
RAPID RECOVERY
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
BUILDABLE
Small pipelined builds on generic build machines
Seconds, not minutesor hours
Short feedback cycles
(Dan Worthington-Bodart, @danielbodart-http://bit.ly/M85wsX)
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
Build dependencies may mirror runtime deps
msbuild/mfor multi-threaded builds
(forces component isolation)
Gallio(MbUnit) –replacement engine for NUnit
NuGet+ Squid for super-fast build artefacts
RAM disk for some working copy operations

#webperfdays
@matthewpskelton
TESTABLE
Test (separation, harnesses, points)
IDENTIFIABLE
Meaningful versions, packages,
defined dependencies, artefact
management
(think component boundaries)
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
Enforced “onion” testing layers
(test separation, build machine firewalls, build agent types, …)
Semantic Versioning
(A.B.C.D + contract to ‘clients’)
30+ external services
(test harnesses)

#webperfdays
@matthewpskelton
DEPLOYABLE
Rapid, scriptable, simple failure modes
MONITORABLE
Logging, metrics, transaction tracing
CONFIGURABLE
Inject settings –no ‘black boxes’
LIGHTWEIGHT
Keep things small and easily comprehendible
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
GO, MSDeploy, hand-rolled, Octopus, MSDeploy
(“as simple as xcopy”)
Graphite + SqlToGraphite
(https://github.com/perryofpeek/SqlToGraphite)
LogStash+ log4net
(tune logging levels with config, transaction tracing)
SCOM –operations manager
(early monitoring in Dev)

#webperfdays
@matthewpskelton
INSTANTIABLE
No snowflakes or singletons
RECOVERABLE
No nasty zombies after failures
MTTR more important than MTBF*
* for most kinds of F
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
Rebuild Build Agents with Chef
Chef for environment rebuilds
Call Start()and Stop()on each
component

#webperfdays
@matthewpskelton
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
Well-known monolithic business rules engine
Costly to build, deploy, configure, test
Being replaced

#webperfdays
@matthewpskelton
RELIABLE
REPEATABLE
RAPID
RECURRING
#webperfdays
@matthewpskelton

#webperfdays
@matthewpskelton
LOAD BALANCING
HIGH AVAILABILITY
SCALING
ELASTIC
RAPID RECOVERY
#webperfdays
@matthewpskelton
LIGHTWEIGHT
TESTABLE
MONITORABLE
CONFIGURABLE
RECOVERABLE
IDENTIFIABLE

#webperfdays
@matthewpskelton
architecture
= f (build&deploy)
(for some systems)
thank you
webperfdays.org
matthewskelton.net| @matthewpskelton
Thanks to: Attila S, Jack R and OwainP for feedback.
Picture credits:
Label: seanlabel.com; Sheep: gallery.hd.org; Train:worldontrains.blogspot.co.uk; Gurner: mog.com; Petra:
Wikimedia/Berthold Werner; army engineers: US DoD; ball of mud: pwern.blogspot.co.uk; sports car:xarj.net;
zombie: bjj.org; feather: Wikipedia; punch: thelegalblitz.com; passport: coverpalace.com; dogs:
reluctantmemsahib.wordpress.com; Meccano: dalefield.com