Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
High-Impact refactors keeping the lights on
Ticketea Engineering
September 23, 2017
Programming
1
180
High-Impact refactors keeping the lights on
First presented at PyConES 2017
Ticketea Engineering
September 23, 2017
Tweet
Share
More Decks by Ticketea Engineering
See All by Ticketea Engineering
ticketeaeng
0
200
ticketeaeng
0
180
ticketeaeng
0
150
ticketeaeng
0
90
ticketeaeng
0
140
ticketeaeng
0
49
ticketeaeng
1
260
ticketeaeng
2
340
Other Decks in Programming
See All in Programming
yaamaa
0
450
e10dokup
0
450
masayaaoyama
4
550
s_uryu
0
220
azdaroth
0
140
maito1201
0
150
makicamel
1
180
danilop
0
120
akatsukinewgrad
0
210
dulltz
0
530
malvinstn
1
660
ufoo68
1
180
Featured
See All Featured
hursman
106
9.2k
phodgson
87
3.9k
scottboms
251
11k
jasonvnalue
82
8.1k
philnash
8
500
skipperchong
7
670
davidbonilla
70
3.5k
bryan
100
11k
vanstee
116
4.8k
lauravandoore
11
1.3k
lara
590
61k
myddelton
109
11k
Transcript
High-impact refactors keeping the lights on @Kartones Diego Muñoz
01. What 02. Why 03. How 04. When Agenda
What
What
What
Why
Why
Why
How
Mega structures How
Mega structures How
DB High-frequency selling How CMS API CRUD Current (simplified) flow
How Extend, not modify* API DB High-frequency selling CRUD CMS
REDIS EVENT BUS EVENT BUS APU *do modify if needed to allow extension
Patterns & Practices - Parallel change - Strangler How API
DB High-frequency selling CRUD CMS REDIS EVENT BUS EVENT BUS APU
How API DB High-frequency selling CRUD CMS REDIS EVENT BUS
EVENT BUS APU Patterns & Practices - Event Bus - Cursor-based - N writers/readers
How API DB High-frequency selling CRUD CMS REDIS EVENT BUS
EVENT BUS APU Patterns & Practices - Event Sourcing
How API DB High-frequency selling CRUD CMS REDIS EVENT BUS
EVENT BUS APU “Build exciting things with boring nice technologies” - Python 3.6 · Strongly typed (Mypy) · Dockerized - Redis with LUA - AWS Kinesis github.com/ticketea/pynesis
When
When Continous Iteration - No hard deadline - Desired: soon
:-)
Latest benchmark: ~4100 ops/sec - Single CPU core, 20k tickets,
50k concurrent users - Attacking internal API - Room for optimization When
Current status: - Free events - Paid events on their
way · Play safe (money involved!) · Lots of payment methods When
Release plan: - Now: Hack (Special payment method) - 1.0:
Feature Toggling When
Rollout plan 01. Canary: big free event 02. Dark launch:
on paid events 03. B/G: Gradual switch When
THE END Thanks! @Kartones