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. High-impact refactors keeping the lights on @Kartones Diego Muñoz

  2. 01. What 02. Why 03. How 04. When Agenda

  3. What

  4. What

  5. What

  6. Why

  7. Why

  8. Why

  9. How

  10. Mega structures How

  11. Mega structures How

  12. DB High-frequency selling How CMS API CRUD Current (simplified) flow

  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
  14. Patterns & Practices - Parallel change - Strangler How API

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

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

    EVENT BUS APU Patterns & Practices - Event Sourcing
  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
  18. When

  19. When Continous Iteration - No hard deadline - Desired: soon

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

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

    way · Play safe (money involved!) · Lots of payment methods When
  22. Release plan: - Now: Hack (Special payment method) - 1.0:

    Feature Toggling When
  23. Rollout plan 01. Canary: big free event 02. Dark launch:

    on paid events 03. B/G: Gradual switch When
  24. THE END Thanks! @Kartones