Date post: | 15-Apr-2017 |
Category: |
Technology |
Upload: | hakka-labs |
View: | 227 times |
Download: | 0 times |
BYOMQ: Why We [re]Built IronMQ
Reed Allman
@rdallman10
Making [another!] Case for NIHReed Allman
@rdallman10
Beating A Dead Horse [again!]Reed Allman
@rdallman10
There
Are
Too
Many
Options
Me Showing .gifs for 30 MinutesReed Allman
@rdallman10
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.
Proof by Contradiction
Throw this at ${USE_CASE}
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
Could you do better?
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
If it's a core business function -- do it yourself, no matter what.
- Joel Spolsky
Excel
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
Pain meow or later?
To the Queues!
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
...Scalable, Low-Latency, Persistent MQ for Job Processing
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
boom
Results
Full understanding and control makes for quick fixes, easy to add features
Don’t have to build a daemon to add features, can bake everything in
Takes a long time to get to stable
Make all your own tools, plumb any data you want out
Build exactly what you need, optimized for what you are doing
Use the language(s) you know and love
My attempt to say profound shit:
Be a builder, not a plumber.
Questions?