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.

Bind to unix domain socket instead of ip address

See original GitHub issue

When running applications like uvicorn behind a reverse proxy like NGINX it is best practice to use a unix domain socket instead of binding to an ip address. This has the benefit of improved security and performance.

This could be implemented the same way as gunicorn does it. If the bind parameter starts with unix:, use a unix domain socket. One caveat is that the socket file will have to be created beforehand and cleaned up afterwards.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tomchristiecommented, Jun 29, 2018

Documented this better under 0.2. - http://www.uvicorn.org/#running-with-gunicorn

Also things are more properly split out now - the standard command line tool doesn’t depend on gunicorn, but we include a gunicorn worker class, and document using that, as well as running the cli for simpler style.

0reactions
tomchristiecommented, Apr 9, 2018

Note: We do need to document this. We currently don’t have any proper documentation about the available command line arguments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UNIX domain sockets - IBM
Unlike internet sockets in the AF_INET domain where the socket is bound to a unique IP address and port number, a UNIX domain...
Read more >
What is the difference between Unix sockets and TCP/IP ...
UNIX domain sockets know that they're executing on the same system, so they can avoid some checks and operations (like routing); which makes...
Read more >
Is there any purpose to `bind()` unix domain socket client ...
When a socket is created with socket(2), it exists in a name space (address family) but has no address assigned to it. bind()...
Read more >
What is non-networked Unix domain socket? - Super User
(However, the actual API is almost identical between IP and Unix sockets – programs use the same socket(), bind(), connect() calls for both ......
Read more >
Unix Domain Socket bind, reuse address
I would test your assertion regarding unlink() From memory, its the inode not the file path which is technically listened to. · You...
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