4 ms·
We'll approach it like a network-on-a-chip: 128 servers with an extremely fast network. Each server will be a process. One process will be something like ingres
by javajosh 3y ago
We'll approach it like a network-on-a-chip: 128 servers with an extremely fast network. Each server will be a process. One process will be something like ingress, another like a message queue and the rest will be workers. Chances are the chip doesn't need or want to be saturated, so you rotate the cores using Linux magic of some kind.
Put that on a napkin and give it to an unsuspecting intern.
- loeg 3y agoCertainly the closer you can get to shared-nothing, the better! Some of the difficulty is we have a legacy stack that is not implemented that way. (You also need to account for significant kernel CPU use, like hardware interrupt handlers (e.g., NIC rx) running on some cores.)
- toast0 3y ago> You also need to account for significant kernel CPU use, like hardware interrupt handlers (e.g., NIC rx) running on some cores. In a lot of loads, it doesn't matter that much, because the application uses way more CPU than packet handling... But if it does matter, you really want to get things lined up as much as possible. Each CPU core gets one NIC queue pinned and one application thread pinned and the connections correctly mapped so the fast path never communicates to other cores. I'm not tuned into current NICs though, I don't know if you can get 128 queues on NICs now. If you have two sockets, then you also have the fun of Non-Uniform PCI-E Access... When I was working on this (for a tcp mode HAProxy install), the NICs did 16 queues, and I had dual 12 or 14-core CPUs, so socket 0 got all its cores busy, and socket 1 just got a couple work threads and was mostly idle. Single socket, power of 2 cores is a lot better to optimize, but I had existing hardware to reuse.
- onlyrealcuzzo 3y agoAnyone have some napkin math on how many QPS something like this can handle??
- foota 3y agoRe: speed, you'd likely get orders of magnitude better bandwidth out of a real network of 128 servers instead, though latency would be lower here.