You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our stack consists of a number of (now) Bun binaries performing stages of a multi stage data switch. All of the external communications are using WebSockets, and for ease and consistency we also use WebSockets between processes on the same instance.
We are thinking about long term scaleability. Obviously we could move from WebSockets over 127.0.0.1 to a Unix domain socket approach, but this will still see the data packets copied from userland to kernel and back again. If we look at some of the major projects for example like DPDK relating to accelerated networking, they implement shared memory structures and ring buffers to implement very high performance data functions without copying the packet data around the memory and I/O processors.
In our case, we have multiple producers and potentially multiple consumers. One possible approach would be to build capabilities that utilise the ring buffers implemented in DPDK, or something similar natively in Zig itself. Keen to hear anyone's thoughts or ideas on this subject and really just wanting to open up a discussion to see whether it fits the Bun roadmap or whether we should consider this externally to Bun.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Our stack consists of a number of (now) Bun binaries performing stages of a multi stage data switch. All of the external communications are using WebSockets, and for ease and consistency we also use WebSockets between processes on the same instance.
We are thinking about long term scaleability. Obviously we could move from WebSockets over 127.0.0.1 to a Unix domain socket approach, but this will still see the data packets copied from userland to kernel and back again. If we look at some of the major projects for example like DPDK relating to accelerated networking, they implement shared memory structures and ring buffers to implement very high performance data functions without copying the packet data around the memory and I/O processors.
In our case, we have multiple producers and potentially multiple consumers. One possible approach would be to build capabilities that utilise the ring buffers implemented in DPDK, or something similar natively in Zig itself. Keen to hear anyone's thoughts or ideas on this subject and really just wanting to open up a discussion to see whether it fits the Bun roadmap or whether we should consider this externally to Bun.
Beta Was this translation helpful? Give feedback.
All reactions