Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 1 physical machine with 2 VMs (VMWare esxi) - one for database (PostgreSQL 9.2.1), and one for application. I'd like my application to connect to my database in an efficient way, and I've heard that using a file system socket is more efficient than a network socket (TCP overhead, IIRC).

  1. Is there a way to use a file system socket with the aforementioned setup? Or...
  2. Is there another, efficient connection method you'd recommend?
share|improve this question
up vote 4 down vote accepted
  1. No, file system sockets (formally Unix Domain Sockets) only work within the same operating system (and while it's technically true that they're more efficient than network sockets, it's a pretty small difference unless you're sending tons of tiny requests).

  2. TCP should work just fine here. If it doesn't after some testing, worry about it then. If you do have problems, they're more likely due to poor query design than the communication protocol between the application and server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.