Score:1

TCP packets split into ACK and PSH,ACK in Docker

es flag

I am working on a mainly TCP based Game Server and just tried to run it in a Docker container. However, I observed that when accessing the Server in a container (via the Game Client), the packets for every SeqNo are split into two parts. The first part is an empty TCP-ACK (no payload), the second part is a TCP,PSH-ACK that contains the full payload. Since this pattern applies to all packets sent from or to the server, it is obvious that they belong together.

Why is this happening and, moreover, why is this only happening when the Server runs in a Docker container?

mforsetti avatar
tz flag
Does this answer your question? [What is \[PSH, ACK\] doing during my connection to a global catalog server?](https://serverfault.com/questions/614590/what-is-psh-ack-doing-during-my-connection-to-a-global-catalog-server)
Michael Hampton avatar
cz flag
Can you show a packet capture?
elsamuray7 avatar
es flag
I just realized that the problem is not that 2 TCP packets for each logical packet is sent but rather that my server interprets it as 2 packets in the Docker container, while it interprets it as 1 packet everywhere else. Now I am ansure whether this is more a problem of the programming language (i.e. its implementation of sockets, I am using Java) or whether the problem is on the OS level. Any ideas?
Score:1
us flag

I'm not sure how you are running your running your game-server inside Docker but docker are working that way you have following

Host - Network Docker - Network Docker Swarm - Ingress network (Swarm) Docker Service - Overlay network (Container services)

In this case you have different layer of network in Docker to work with, and all inside Docker are virtual-networks.

The next step you need to understand with Docker if you are working in Swarm mode its when you are hitting Docker Swarm its pointing based on port number to your container services, if you are running more then 1 replicates in your Swarm then 2 request are mabey, mabey not hitting the same server twices.

So the issue you ask about I think its related to how the internel network in Docker are working, you can read more about how network in Docker is working and mabey its just a setting for you to change eg. host

Docker Network Drivers: https://docs.docker.com/network/#network-drivers

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.