Speed up web server response

Hello all, I’m using the AWS in my app, it all works fine. But I discovered that when I have an active TCP connection besides the web server, the web server responds much quicker than when I don’t have an active TCP connection. Is there some way to speed up the response of the web server, by changing priorities or settings or calling specific functions (without needing a TCP connection of course)? I hope somebody can assist me, Milo