MongoDB Golang driver can now talk to Unix Domain Sockets

in #utopian-io7 years ago

Repository

https://github.com/globalsign/mgo

New Features

Replaced every net.TCPAddr and net.TCPConn with their generic interface types net.Addr and net.Conn. Added socket recognition to the URI-parser.

GitHub Account

https://github.com/pzillmann

Sort:  

Thanks for the contribution, @unixfriend! Great communication on the PR and some great work, keep it up! Would be great if, for future contributions, you could give a little bit more information (for people who aren't familiar with the project) about the project itself, why the added feature is valuable etc.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

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

Hey @unixfriend
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!