←back to thread

183 points crescit_eundo | 1 comments | | HN request time: 0s | source
Show context
adamcharnock ◴[] No.45055206[source]
I had a developer colleague a while back who was toying with an idea that would require emitting and consuming a _lot_ of messages. I think it was somewhere on the order of 10k-100k/second. He was looking at some pretty expensive solutions IIRC.

I asked if the messages were all under 1.5kb, he said yes. I asked if at-most-one delivery was ok, he said yes. So I proposed he just grab a router and fire messages through it as UDP packets, then use BGP/ECMP to balance the packets between receivers. Add some queues on the router, then just let the receivers pick up the packets as fast as they could. You'd need some kind of feedback to manage back pressure, but ¯\_(ツ)_/¯

A fairly cheap way to achieve 1M+ messages per second.

I never got the chance to flesh-out the idea fully, but the simplicity of it tickled me. Maybe it would have worked, maybe not.

replies(1): >>45055387 #
HeyLaughingBoy ◴[] No.45055387[source]
Isn't a fundamental property of a queue that it's FIFO?

UDP message delivery order is not guaranteed. Hell, UDP delivery itself is not guaranteed (although IME, messages don't usually get dropped unless they cross subnets).

replies(3): >>45055437 #>>45055745 #>>45081133 #
1. adamcharnock ◴[] No.45055745[source]
> UDP message delivery order is not guaranteed

My thinking was that ordering would be pretty unaffected when there is only a single hop. But yeah, we would have needed to test that under load.