1. What is Port 6379?
Port 6379 is the universally recognized port for Redis (Remote Dictionary Server). Redis is an ultra-low-latency in-memory data structure store used as a database, cache, streaming engine, and message broker.
Salvatore Sanfilippo (antirez), the creator of Redis, chose port 6379 because on a standard telephone keypad (ITU-T E.161), the digits 6-3-7-9 spell out the word **MERZ** — an inside joke named after Italian showgirl Alessia Merz whose name was used in discussions by his IRC circle.
2. How Port 6379 Works Under the Hood
Process creates a Winsock socket (`AF_INET`/`AF_INET6`, `SOCK_STREAM`) and binds to local port 6379.
Windows TCP/IP stack records the listening state in `MIB_TCPTABLE_OWNER_PID`.
Inbound HTTP/TCP traffic to `127.0.0.1:6379` is delivered directly through Windows loopback with zero physical NIC overhead.
Redis uses an asynchronous, single-threaded event loop driven by I/O multiplexing (`epoll` on Linux, `IOCP` / `select` on Windows ports): 1. `redis-server` opens TCP port 6379 in non-blocking mode. 2. Clients send commands encoded using the lightweight binary-safe **RESP** (REdis Serialization Protocol). 3. The server processes operations in-memory in microsecond timeframes without disk seek delays. 4. Optional persistence mechanisms (RDB snapshots and AOF logs) write to disk in the background while port 6379 continues serving client queries.
3. Common Conflicts & 'Could not connect to Redis at 127.0.0.1:6379: Connection refused'
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Common Redis port issues on Windows: - Attempting to connect when Redis is running inside WSL2 without proper port-forwarding to the Windows host. - Leaving a Docker container binding `6379:6379` while trying to run a native Windows `redis-server.exe` build. - BullMQ or Celery worker processes attempting connection before Redis initialization completes, throwing unhandled connection refused exceptions.
4. How to Find & Stop the Process on Port 6379
If port 6379 is locked by an orphaned process or background service, choose one of the following methods:
PowerShell (Recommended):
Get-Process -Id (Get-NetTCPConnection -LocalPort 6379).OwningProcess | Stop-Process -Force
Classic CMD (Command Prompt):
for /f "tokens=5" %a in ('netstat -aon ^| findstr :6379') do taskkill /f /pid %a
Or simply use PortPeek
Never memorize netstat flags or parse PIDs again.
5. Standards & Related Ports
Official Specifications:
- IANA Service Name and Transport Protocol Port Number Registry
- RFC 6335, RESP (REdis Serialization Protocol)
- Windows Sockets 2 (Winsock) API Documentation