You are viewing a single comment's thread from:
RE: MongoDB Golang driver can now talk to Unix Domain Sockets
Thanks for your feedback @amosbastian.
I append some info about the project to this comment.
mgo
is the database driver for MongoDB for the Golang programming language.
The given driver could only connect to IP addresses and was hard-coded to do so. In many setups the application which likes to query the database, and the database management system are on the same system - so they can use Unix Domain Sockets to communicate. Often this feature is overlooked by many administrators.
Unix Domain Sockets have several advantages:
- up to 30x faster than the loopback interface
- you don't have to remember port numbers - easy recognition because they have ASCII names
- it's a file on the filesystem - so Unix ACLs (owner / group + modes) apply