Does a docker container have its own TCP/IP stack?

The network stack, as in “the code”, is definitely not in the container, it’s in the kernel of which there’s only one shared by the host and all containers (you already knew this). What each container has is its own separate network namespace, which means it has its own network interfaces and routing tables. Here’s … Read more

If TCP is connection oriented why do packets follow different paths?

You, my friend, are confusing the functionality of two different layers. TCP is connection oriented in the sense that there’s a connection establishment, between the two ends where they may negotiate different things like congestion-control mechanism among other things. The transport layer protocols’ general purpose is to provide process-to-process delivery meaning that it doesn’t know … Read more

Nginx TCP (WebSockets) Timeout / Keepalive Config

I tried the websocket_*_timeout which are not supported on nginx 1.7.1 (it gives: unknown directive). However setting a high proxy_*_timeout works: proxy_connect_timeout 7d; proxy_send_timeout 7d; proxy_read_timeout 7d; 7d means 7 days, see official nginx configuration reference Additionally you probably only have to set the proxy_read_timeout 7d; as that’s the one that usually matter unless the … Read more

Benefits of Netty over basic ServerSocket server?

The main advantage of Netty over simply reading from and writing to sockets using streams is that Netty supports non-blocking, asynchronous I/O (using Java’s NIO API); when you use streams to read and write from sockets (and you start a new thread for each connected accepted from a ServerSocket) you are using blocking, synchronous I/O. … Read more

Size of empty UDP and TCP packet?

TCP: Size of Ethernet frame – 24 Bytes Size of IPv4 Header (without any options) – 20 bytes Size of TCP Header (without any options) – 20 Bytes Total size of an Ethernet Frame carrying an IP Packet with an empty TCP Segment – 24 + 20 + 20 = 64 bytes UDP: Size of … Read more

TCP connection, bash only

< and > are usually used to redirect IOs. What does it mean there? Is it usable in another context? How? It’s the same – input and output is redirected to fd 5. Why does it work, while /dev/tcp doesn’t exists? It’s a special file: If host is a valid hostname or Internet address, and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)