High-Impact refactors keeping the lights on

High-Impact refactors keeping the lights on

First presented at PyConES 2017

00927a856336d961bdc7028722fe5897?s=128

Ticketea Engineering

September 23, 2017
Tweet

Transcript

  1. 3.
  2. 4.
  3. 5.
  4. 6.

    Why

  5. 7.

    Why

  6. 8.

    Why

  7. 9.

    How

  8. 13.

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

    REDIS EVENT BUS EVENT BUS APU *do modify if needed to allow extension
  9. 14.

    Patterns & Practices - Parallel change - Strangler How API

    DB High-frequency selling CRUD CMS REDIS EVENT BUS EVENT BUS APU
  10. 15.

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

    EVENT BUS APU Patterns & Practices - Event Bus - Cursor-based - N writers/readers
  11. 16.

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

    EVENT BUS APU Patterns & Practices - Event Sourcing
  12. 17.

    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
  13. 18.
  14. 20.

    Latest benchmark: ~4100 ops/sec - Single CPU core, 20k tickets,

    50k concurrent users - Attacking internal API - Room for optimization When
  15. 21.

    Current status: - Free events - Paid events on their

    way · Play safe (money involved!) · Lots of payment methods When
  16. 23.

    Rollout plan 01. Canary: big free event 02. Dark launch:

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