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

BYOMQ: Build Your Own Message Queue

BYOMQ: Build Your Own Message Queue

Why we [re]built IronMQ

Reed Allman

April 08, 2016
Tweet

More Decks by Reed Allman

Other Decks in Technology

Transcript

  1. Are

  2. Too

  3. NIH: Not Invented Here Syndrome A quick refresher: ...the tendency

    towards reinventing the wheel (reimplementing something that is already available) based on the belief that in-house developments are inherently better suited, more secure, more controlled, quicker to develop, and incur lower overall cost (including maintenance cost) than using existing implementations.
  4. Out of the Box • Massive scale on commodity hardware

    in hours of easy set up • Battle tested, many bugs worked out, lots of docs, tools, guides, etc. • Operate JVM, hard not to code on JVM • Any and all problems associated with any of the boxes or how they fit together • And these are open source! Many boxes are not and suffer vendor lock-in • At mercy of those who understand it / time for fixing bugs, making improvements
  5. Different people come from different backgrounds and, based on that,

    find different tools useful. Ultimately you need to use the tools that let you get your job done most effectively, however that is defined in your particular case. - Russ Cox Go
  6. If it's a core business function -- do it yourself,

    no matter what. - Joel Spolsky Excel
  7. I felt that my team, which was supposed to be

    made up of distributed systems engineers, was really acting more as distributed system plumbers. - Jay Kreps Kafka
  8. Our Requirements: • Easy to run (single binary ideal) in

    any environment & not hosted • Persisted, consistent and performant • Highly available -- fast recovery, no data loss, minimal downtime • Horizontally scalable • Timing based • FIFO • >= 1 time delivery • Multi-Tenant capable+ • Preferably built in Go, HTTP interface
  9. What, briefly • Single Go binary per server • RocksDB

    embedded to store all metadata and messages • Built the distributed database - viewstamped replication, multi-master, gossip membership - scales across queues across nodes, auto-balanced • Linear scaling factor of .98 • Recovery time < 300ms • Simple HTTP interface, stupidly simple clients • Enqueue / Dequeue avg latency < 10ms for < 4KB messages