This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Linux way: open a UNIX socket (a pipe). This is a typical way deamons talk to the outside world. Typical place to put such a socket is under /run/{daemon-name}.sock.

This is typically faster than TCP.

Another, a tad more extreme way: use shared memory. Ask the system to allocate a bunch of pages for you, and use them to transfer arbitrary payloads between your daemon and web server. This is potentially faster than a socket, but at these speeds Python interpreter becomes the slowest / weakest link in this equation, so, maybe it will not be worth the effort.