Skip to main content

What are Unix domain sockets and why use them?

Senior NodeJS
Quick Answer Unix domain sockets are IPC (Inter-Process Communication) channels using the local filesystem instead of TCP รขโ‚ฌโ€ no network stack overhead, no port allocation, faster than localhost TCP. Use them when Node.js and a database/redis run on the same machine, or when communicating between nginx and Node.js รขโ‚ฌโ€ measurably lower latency and higher throughput.

Answer

Domain sockets provide fast interprocess communication with lower latency than TCP. Often used between Nginx and Node.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice