Multiple sockets or one?

I have a web app that, among other things, will have four threads that are doing different tasks. Each thread will have an HTTP socket that calls some endpoints on another server; the endpoints, while different, are all on the same server (so, same IP address and port).

My question: will I run into trouble with this architecture? Will the HTTP responses from the endpoints possibly get routed to the wrong thread, since the original outbound messages are all coming from the same app and the same IP address? Or is this totally cool and should be no problem?

If it IS a problem, would you suggest a single central HTTP socket that implements a queue, and puts IDs into the HTTP headers in so it can deal with the replies and send them to the correct thread?

Each socket will use a different local port number to establish its connection, so it’s totally cool and should be no problem.

@Andrew Lambert: thanks! I was hoping that was the case.