TCP packets split into ACK and PSH,ACK in Docker [closed]

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?


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