[Twisted-Python] pushing out same message on 100k TCPs
tobias.oberstein at tavendo.de
Fri Feb 10 11:56:23 EST 2012
what is the most efficient/performant way of doing the following?
I have a short message prepared .. say a string of 100 octets.
I want to push out that _same_ string on 100k connected TCPs (on a server).
My thinking was: ideally, the 100 bytes would be transferred to kernel/NIC space
just _once_, and then the kernel is only told to resend that buffer on the 100k
Does that make sense, is that even possible, with Twisted, or in general?
Currently I do the naive thing: transport.write(msg) x 100k times .. which I guess
involves quite some copying around and user to kernel space transitions ..
More information about the Twisted-Python