Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High-impact refactors keeping the lights on

Kartones
September 23, 2017

High-impact refactors keeping the lights on

Given at PyConES 2017, MadScalability & MindCamp 9.0

Kartones

September 23, 2017
Tweet

More Decks by Kartones

Other Decks in Programming

Transcript

  1. Why

  2. Why

  3. Why

  4. How

  5. How Extend, not modify* API DB High-frequency selling CRUD CMS

    REDIS EVENT BUS EVENT BUS APU *do modify if needed to allow extension
  6. Patterns & Practices - Parallel change - Strangler How API

    DB High-frequency selling CRUD CMS REDIS EVENT BUS EVENT BUS APU
  7. How API DB High-frequency selling CRUD CMS REDIS EVENT BUS

    EVENT BUS APU Patterns & Practices - Event Bus - Cursor-based - N writers/readers
  8. How API DB High-frequency selling CRUD CMS REDIS EVENT BUS

    EVENT BUS APU Patterns & Practices - Event Sourcing
  9. 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
  10. Latest benchmark: ~4100 ops/sec - Single CPU core, 20k tickets,

    50k concurrent users - Attacking internal API - Room for optimization When
  11. Current status: - Free events - Paid events on their

    way · Play safe (money involved!) · Lots of payment methods When
  12. Rollout plan 01. Canary: big free event 02. Dark launch:

    on paid events 03. B/G: Gradual switch When