question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for unix sockets

See original GitHub issue

Problem

server.address configuration option should also support listening to unix socket files since this is very common in linux servers environments and useful for proxying the application without taking a system port. Very useful feature for shared servers.

Would be cool running something like:

streamlit run --server.address "unix:~/.streamlit.sock" whatever.py

And having it creating the sock file and listening on it.

Solution

Never played with tornado but I believe it has built in unix sockets support so this might be easy to implement. With a fast google I found: https://gist.github.com/superduper/5579037 So bind_unix_socket seems to be the function for it!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
akrolsmircommented, Sep 11, 2020

#1802 has been merged!

1reaction
tvstcommented, Aug 6, 2020

LGTM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unix Sockets are Now Supported on Windows - Bozhidar Batsov
I was surprised to learn that Windows has added support for Unix sockets (AF_UNIX) a few years ago (in 2017). From the announcement...
Read more >
AF_UNIX comes to Windows - Microsoft Developer Blogs
Support for the unix socket has existed both in BSD and Linux for the longest time, but, not on Windows. On Windows, there...
Read more >
unix(7) - Linux manual page - man7.org
UNIX domain sockets support passing file descriptors or process credentials to other processes using ancillary data. Address format A UNIX ...
Read more >
UNIX domain sockets - IBM
UNIX domain sockets support both stream-oriented, TCP, and datagram-oriented, UDP, protocols. You cannot start a UNIX domain socket for raw socket protocols.
Read more >
unix - sockets for local interprocess communication
The AF_UNIX (also known as AF_LOCAL) socket family is used to communicate between processes on the same machine efficiently. Traditionally, UNIX domain sockets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found