# Difference between socket- and port-based connection to outer NGINX?

**URL:** <https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071>\
**Category:** Self-hosting\
**Created:** [3월 29, 2017, 12:09오전 UTC](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071 "2017-03-29T00:09:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**Post date:** [3월 29, 2017, 12:12오전 UTC](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071/2 "2017-03-29T00:12:35Z")

</div>

UNIX sockets (as opposed to TCP sockets) are faster and more efficient, and less prone to accidental disclosure to places you don’t want connections coming from. A misconfiguration can potentially cause a listening TCP socket to be exposed to the Internet, whereas there’s absolutely no way you can make a mistake such that a UNIX socket is exposed directly to the Internet.

---

_[View the full topic](https://meta.discourse.org/t/difference-between-socket-and-port-based-connection-to-outer-nginx/60071)._
